From 6750510215463a6543b06c8891aab950ef83972d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 2 Mar 2026 10:10:36 +0000 Subject: [PATCH 1/2] fix!: Update existing packaging option `cloud.google.com/go/auditmanager/apiv1/auditmanagerpb;auditmanagerpb` for `go_package` PiperOrigin-RevId: 875794180 Source-Link: https://github.com/googleapis/googleapis/commit/9637e50bc0ff6a5e8944980aaf6a2b7f34a90910 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1aed2b6e1c8824a73ca744c3f4d5c4fe99ee710f Copy-Tag: eyJwIjoiQXVkaXRNYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiIxYWVkMmI2ZTFjODgyNGE3M2NhNzQ0YzNmNGQ1YzRmZTk5ZWU3MTBmIn0= --- .../Cloud/Auditmanager/V1/Auditmanager.php | Bin 0 -> 11274 bytes .../Cloud/AuditManager/V1/AuditReport.php | 445 +++++++++ .../V1/AuditReport/ReportGenerationState.php | 82 ++ .../AuditManager/V1/AuditScopeReport.php | 113 +++ .../Cloud/AuditManager/V1/ComplianceState.php | 82 ++ .../Google/Cloud/AuditManager/V1/Control.php | 407 ++++++++ .../Cloud/AuditManager/V1/Control/Family.php | 176 ++++ .../Cloud/AuditManager/V1/ControlDetails.php | 155 +++ .../Cloud/AuditManager/V1/ControlFamily.php | 101 ++ .../AuditManager/V1/DestinationDetails.php | 75 ++ .../AuditManager/V1/EnrollResourceRequest.php | 166 ++++ .../EligibleDestination.php | 81 ++ .../Cloud/AuditManager/V1/Enrollment.php | 105 ++ .../V1/GenerateAuditReportRequest.php | 259 +++++ .../AuditReportFormat.php | 57 ++ .../V1/GenerateAuditScopeReportRequest.php | 211 ++++ .../AuditScopeReportFormat.php | 57 ++ .../AuditManager/V1/GetAuditReportRequest.php | 91 ++ .../V1/GetResourceEnrollmentStatusRequest.php | 96 ++ .../V1/ListAuditReportsRequest.php | 153 +++ .../V1/ListAuditReportsResponse.php | 101 ++ .../AuditManager/V1/ListControlsRequest.php | 163 ++++ .../AuditManager/V1/ListControlsResponse.php | 101 ++ .../ListResourceEnrollmentStatusesRequest.php | 159 +++ ...ListResourceEnrollmentStatusesResponse.php | 101 ++ .../AuditManager/V1/OperationMetadata.php | 307 ++++++ .../Cloud/AuditManager/V1/OperationState.php | 105 ++ .../V1/ReportGenerationProgress.php | 321 +++++++ .../Cloud/AuditManager/V1/ReportSummary.php | 203 ++++ .../V1/ResourceEnrollmentStatus.php | 224 +++++ .../ResourceEnrollmentState.php | 71 ++ .../V1/AuditManagerClient/enroll_resource.php | 81 ++ .../generate_audit_report.php | 101 ++ .../generate_audit_scope_report.php | 96 ++ .../AuditManagerClient/get_audit_report.php | 73 ++ .../V1/AuditManagerClient/get_location.php | 57 ++ .../get_resource_enrollment_status.php | 78 ++ .../AuditManagerClient/list_audit_reports.php | 76 ++ .../V1/AuditManagerClient/list_controls.php | 78 ++ .../V1/AuditManagerClient/list_locations.php | 69 ++ .../list_resource_enrollment_statuses.php | 77 ++ .../v1/src/V1/Client/AuditManagerClient.php | 855 +++++++++++++++++ .../v1/src/V1/gapic_metadata.json | 68 ++ .../audit_manager_client_config.json | 94 ++ .../audit_manager_descriptor_config.php | 206 ++++ .../audit_manager_rest_client_config.php | 284 ++++++ .../Unit/V1/Client/AuditManagerClientTest.php | 906 ++++++++++++++++++ 47 files changed, 7967 insertions(+) create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php create mode 100644 owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php diff --git a/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php b/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php new file mode 100644 index 0000000000000000000000000000000000000000..d3a021b12e854079db640b491000d50be468aadf GIT binary patch literal 11274 zcmbtaPiz}m8Q-y+H2u=1?n~Qb)9%)t{!6o6yK#5RuG?&P;y9_hj%_(fS5!fxi9Jb& zbv$Nf+)}EDKLVr`LMyQn9FVwxIP3u-4l7OwAp~fJ5CXJ^Js=Q!Ks|v3m)#5B`!nNb z#~#}ymx*WI_r34^-uM5#o3|SG8*nbZV%AN^@XTs_>rvdhZ^j#r?b#K(7T;=aZ<|iM zV(&Jrn&~9s@ugzCP+X5^mvZZ8k<_)DPQ^^ecWis7W+p2&yID;d&8p??8g*mGbdnF| z+kPh)Z-Bb7Yq|}iV#ZfWi>sz*R1MGATw!cBGnCDyCb8MPJAVV9QZrmPF29Gz5XZkp zbE{@m;;v_S_&9I5x>dJ4%cxmj!c{HAw~d->B7^;7x105fXW8{QB`DS_=IrG-=Sjz& zZ`g>!LfjXuM1et2Hgk2)bm~TJbIEioj@9sNr-Vb(=^fJx;G}P6FNo!HfuDj`UYfUW{y$CZk%dC6D z(JWhLt-5I5Hy&8FGaPBz6sj|@ka@el<237atG=^YY*2+AZjr&>ty`#ip0V5LE-~Bl z7hki)4r|qFu%XLn1hc^w&<(i+|0zLoNbM)5IYEM%OF}l6#Dn>nDZ$QYSZGjmSGdv4 zoRL0kQ|R?AfxQ^;tTez80E+C%UpvWNX%r zwN*3G+7jzNu6ZPGSG$Ss9p7{;Z*s29E=7WaTptY+je#hZ~6dIPo&nv z(dZ*fqEp6Y#+%Q07LH3YZ9C|3AKK1a(<6b{>NcG0&VgKp3)%)cd3`NYEM@g_wp1*y z>&wORsEY=^q) zQ-6@RyMugZ2$0((6MyQG_WD0=2_w2XKddu1r z^+yU^>?ft$z#wUo%}qG%J4@YU&W$2SjTj*`U6h`>t?S`B)C(_i8jjY@FM7HpXW%!Y z>bDe_qH;>A65w~M1HUB0?=soE6b7KgX?WPa4Ac9i5jbVx2%A@Tm>ctPxg3s*Bo5uO zXdgW8!U@!8iO5&sg*FuyP{6=Ys9#rLk}fS{*FB710mwHyK)%92z6j^pT167uX&h)> z%)bv0umi{2r4ZoWgt3Z{Oz7K%a9qVY2Ep|25t!y)NVs6kn=l#LL8W)e>ln9D(YbG! zNL>k^HORZDe=+&wr(j~+uxd@mM9nZnYPM0uY;gb3SvK?>oRnOpoCc(5kl_Mm;jpaL z)7RK1)UW6#+T|hi>+L8&%Xg7uZR(1OKSs(hDT`CZn#ZcS=(MPJxf+i9QY-CQ;&e>< z^t+KK+B*@r7^bX}RIg)V_j$A8xyi@kzrAG5uJH6M`Plz=FWGW~IJEU+kG!^R*Q%z2 zZ}~sN(%-S29iwi2$)8gGIV7*S@s?n23R*wZKSUtLT!@sskuz|@rMaANU#Nqa;MYCs z#+2E^x1R~NEbz`_>HjKEw0|pbB@Etu6BPypnQ@gwL{Ql)U6yl?S!`l?WUQOy4io$xAR^L5ufHot6m<$MMvRugHi3E0q&Lxy21`9>&aim6K4Y z2Oyb*QO|I&vTjBADBZ3HrnAM;Xkp9fiFnY~vA}aNUudPeQB1u~I=ogft9pf|>9rcu z!s$_zVvGwn4da*r>B!hcA2fZCIRhHD)E|#hC)z#D3REYkea46el14I*IG&pIvFTd( ziOPrO9$c6yiWIH2OkPNgEsjhpG=x5jb(Q5dYQ`g-rFFED5D@G_tYru+h2bDfqzd7a z_gY(``v>m(RTrjue5VCOIlETeC}*;IwooqS^Q+kcmJ{pRdbXp0h{0j(DTz^7QYhpI z9Lg1LXUn;D{23vKVT`lDU(xjUqffN&MV~HxC7&D2nw%b6ZK9F--}Wbqdqf}9_rDP@Aa8V=CH z;slKG=!Tm$9=uk+ihZT7jIr2(bD~&Y$riF@Z9P{kboC-fVLVsROXcDU`kgiIL^8$I zQa;O_2*BvFmdjHYLMGwp+Q#atR{kuyqBjb~Hw&=?=|5t$|GhGJ&POtX8aoTHe0@QX z=Nqy|w80!w2#YzM!3zGVacQXf3LFs%v25&GwMS@&)LdA+BF8(z2}^*~PY=LB zK}wE7#2+2lU0VbSa;7K-zEM5_3)X!r3Nb~3i^sX6f2iPS_-4fuWFVaIqIf$28QixdT#vs-Wug?LP@*SzFEJsou*y zyitf~8MGPtT*rt@pBrc>_{?ar1MImP8)45cwz3o(VeClGA-z`gma+v* zRrkjld4lKB0Fy(|vI)C2%PcDT@lFE9Dn(}CWak$V)o#wA)*tQI zV@z32vmlt$=<2#<-OP?A-xu%YDq@gS!CGcTDa1-j~4B~nSo0w z^*72#8euud6?EMG;gS2bKY#pg$IEcOId^i)~D2cT)XhsA)plRR z`l45aC*dbu4C-$v>P>0w-J#|;1*C~wJWuC$6DaJ9>Vm|g2khZI$ZsPs*@gypVC0o> z1iFy;*gfY{N=K`SzzM1!Dj#U^j*=+&>i1GU(vloZaSV24Fi;<>pOF9w!<4VG9nJ;y z6^S|&&MxHSXV_)yJS-qD`(Si$adeLNG3;}=vY(8%&DEcv9*RRIre!}+$jfX^{NQOJ z%*42&h?U)&CrO!b04(pN2zMT0u0a4KA7dKOe!$Vs|Fw_y0UP|(MRh*X*y$ew$P~+@ zeWULFt__yt++MIuM$&zeoiyZM5jcf{`#!U?$w6KZSCbG@AAmj@(`#llM;VUaDdaV_ z?O}^^diR15o?C=Fr4U5J8DvSOB|?b8CPUefUq|41YA3x`Zn`8Bj(Rw?5B$>q$3z(J zcRLLCn~FeT5X0>aM6erzO%F5f&4BzO0*5IOB3F0GeE;?OV||EH!;lC-XqqB>viB9C zSN#D=Vkd`%T^G$YDUx~j-m8QMhcGC5kfsTb41%YCiH9Hm zq7mL_*s-~j5>h2`%8r|fjjbE9+>NdGBBxi_eZ)kD-bYNxiEQHT{0IK$O>tk5Usx2G z?k3(?d=fds8Kl#ULpm+9NT+dxwgz+Ztet=?v*WhBIHMyMe1#4@etV*sa5ao;QR*QF zyyx3}&tv&#_oKNd+CP;656W)_I@IUnv87ax{eSmJdZ1-X$}G|1wVh!b=KjRktMmWe zd!l_?d77ImgY6g@9{jCQgw(UIT?+0aUf~x=rTeBRJ>G}ya@UlNgoogle.cloud.auditmanager.v1.AuditReport + */ +class AuditReport extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this Audit Report, in the format of scope given in + * request. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Report summary with compliance, violation counts etc. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $report_summary = null; + /** + * Output only. ClientOperationId + * + * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $operation_id = ''; + /** + * Output only. The location where the generated report will be uploaded. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destination_details = null; + /** + * Output only. Compliance Standard. + * + * Generated from protobuf field string compliance_standard = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compliance_standard = ''; + /** + * Output only. The parent scope on which the report was generated. + * + * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scope = ''; + /** + * Output only. Creation time of the audit report. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The overall status of controls + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $control_details; + /** + * Output only. The state of Audit Report Generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $report_generation_state = 0; + /** + * Output only. Compliance Framework of Audit Report + * + * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compliance_framework = ''; + /** + * Output only. The ID/ Number for the scope on which the audit report was + * generated. + * + * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scope_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this Audit Report, in the format of scope given in + * request. + * @type \Google\Cloud\AuditManager\V1\ReportSummary $report_summary + * Output only. Report summary with compliance, violation counts etc. + * @type string $operation_id + * Output only. ClientOperationId + * @type \Google\Cloud\AuditManager\V1\DestinationDetails $destination_details + * Output only. The location where the generated report will be uploaded. + * @type string $compliance_standard + * Output only. Compliance Standard. + * @type string $scope + * Output only. The parent scope on which the report was generated. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of the audit report. + * @type array<\Google\Cloud\AuditManager\V1\ControlDetails>|\Google\Protobuf\Internal\RepeatedField $control_details + * Output only. The overall status of controls + * @type int $report_generation_state + * Output only. The state of Audit Report Generation. + * @type string $compliance_framework + * Output only. Compliance Framework of Audit Report + * @type string $scope_id + * Output only. The ID/ Number for the scope on which the audit report was + * generated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this Audit Report, in the format of scope given in + * request. + * + * 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 Audit Report, in the format of scope given in + * request. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Report summary with compliance, violation counts etc. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\ReportSummary|null + */ + public function getReportSummary() + { + return $this->report_summary; + } + + public function hasReportSummary() + { + return isset($this->report_summary); + } + + public function clearReportSummary() + { + unset($this->report_summary); + } + + /** + * Output only. Report summary with compliance, violation counts etc. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\ReportSummary $var + * @return $this + */ + public function setReportSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); + $this->report_summary = $var; + + return $this; + } + + /** + * Output only. ClientOperationId + * + * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * Output only. ClientOperationId + * + * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + + /** + * Output only. The location where the generated report will be uploaded. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\DestinationDetails|null + */ + public function getDestinationDetails() + { + return $this->destination_details; + } + + public function hasDestinationDetails() + { + return isset($this->destination_details); + } + + public function clearDestinationDetails() + { + unset($this->destination_details); + } + + /** + * Output only. The location where the generated report will be uploaded. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\DestinationDetails $var + * @return $this + */ + public function setDestinationDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\DestinationDetails::class); + $this->destination_details = $var; + + return $this; + } + + /** + * Output only. Compliance Standard. + * + * Generated from protobuf field string compliance_standard = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getComplianceStandard() + { + return $this->compliance_standard; + } + + /** + * Output only. Compliance Standard. + * + * Generated from protobuf field string compliance_standard = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setComplianceStandard($var) + { + GPBUtil::checkString($var, True); + $this->compliance_standard = $var; + + return $this; + } + + /** + * Output only. The parent scope on which the report was generated. + * + * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Output only. The parent scope on which the report was generated. + * + * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Output only. Creation time of the audit report. + * + * 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. Creation time of the audit report. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The overall status of controls + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getControlDetails() + { + return $this->control_details; + } + + /** + * Output only. The overall status of controls + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AuditManager\V1\ControlDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setControlDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ControlDetails::class); + $this->control_details = $arr; + + return $this; + } + + /** + * Output only. The state of Audit Report Generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getReportGenerationState() + { + return $this->report_generation_state; + } + + /** + * Output only. The state of Audit Report Generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setReportGenerationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\AuditReport\ReportGenerationState::class); + $this->report_generation_state = $var; + + return $this; + } + + /** + * Output only. Compliance Framework of Audit Report + * + * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getComplianceFramework() + { + return $this->compliance_framework; + } + + /** + * Output only. Compliance Framework of Audit Report + * + * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setComplianceFramework($var) + { + GPBUtil::checkString($var, True); + $this->compliance_framework = $var; + + return $this; + } + + /** + * Output only. The ID/ Number for the scope on which the audit report was + * generated. + * + * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getScopeId() + { + return $this->scope_id; + } + + /** + * Output only. The ID/ Number for the scope on which the audit report was + * generated. + * + * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setScopeId($var) + { + GPBUtil::checkString($var, True); + $this->scope_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php new file mode 100644 index 000000000000..c4d761454990 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php @@ -0,0 +1,82 @@ +google.cloud.auditmanager.v1.AuditReport.ReportGenerationState + */ +class ReportGenerationState +{ + /** + * Unspecified. Invalid state. + * + * Generated from protobuf enum REPORT_GENERATION_STATE_UNSPECIFIED = 0; + */ + const REPORT_GENERATION_STATE_UNSPECIFIED = 0; + /** + * Audit report generation process is in progress, ie. operation state is + * neither OPERATION_STATE_DONE nor OPERATION_STATE_FAILED. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * Audit report generation process is completed. Operation state is + * OPERATION_STATE_DONE. + * + * Generated from protobuf enum COMPLETED = 2; + */ + const COMPLETED = 2; + /** + * Audit report generation process has failed. Operation state is + * OPERATION_STATE_FAILED. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * Audit report generation process has completed. But report summary is + * unknown. This is valid for older reports. + * + * Generated from protobuf enum SUMMARY_UNKNOWN = 4; + */ + const SUMMARY_UNKNOWN = 4; + + private static $valueToName = [ + self::REPORT_GENERATION_STATE_UNSPECIFIED => 'REPORT_GENERATION_STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::COMPLETED => 'COMPLETED', + self::FAILED => 'FAILED', + self::SUMMARY_UNKNOWN => 'SUMMARY_UNKNOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReportGenerationState::class, \Google\Cloud\AuditManager\V1\AuditReport_ReportGenerationState::class); + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php new file mode 100644 index 000000000000..5c56618fa228 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php @@ -0,0 +1,113 @@ +google.cloud.auditmanager.v1.AuditScopeReport + */ +class AuditScopeReport extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this Audit Report, in the format of scope given in + * request. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + protected $audit_report; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope_report_contents + * The audit scope report content in byte format. + * @type string $name + * Identifier. The name of this Audit Report, in the format of scope given in + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * The audit scope report content in byte format. + * + * Generated from protobuf field bytes scope_report_contents = 1; + * @return string + */ + public function getScopeReportContents() + { + return $this->readOneof(1); + } + + public function hasScopeReportContents() + { + return $this->hasOneof(1); + } + + /** + * The audit scope report content in byte format. + * + * Generated from protobuf field bytes scope_report_contents = 1; + * @param string $var + * @return $this + */ + public function setScopeReportContents($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Identifier. The name of this Audit Report, in the format of scope given in + * request. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of this Audit Report, in the format of scope given in + * request. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * @return string + */ + public function getAuditReport() + { + return $this->whichOneof("audit_report"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php new file mode 100644 index 000000000000..d8dcc8141bf7 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php @@ -0,0 +1,82 @@ +google.cloud.auditmanager.v1.ComplianceState + */ +class ComplianceState +{ + /** + * Unspecified. Invalid state. + * + * Generated from protobuf enum COMPLIANCE_STATE_UNSPECIFIED = 0; + */ + const COMPLIANCE_STATE_UNSPECIFIED = 0; + /** + * Compliant. + * + * Generated from protobuf enum COMPLIANT = 1; + */ + const COMPLIANT = 1; + /** + * Violation. + * + * Generated from protobuf enum VIOLATION = 2; + */ + const VIOLATION = 2; + /** + * MANUAL_REVIEW_NEEDED, requires manual review + * + * Generated from protobuf enum MANUAL_REVIEW_NEEDED = 3; + */ + const MANUAL_REVIEW_NEEDED = 3; + /** + * Error while computing status. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + /** + * Cannot be audited + * + * Generated from protobuf enum AUDIT_NOT_SUPPORTED = 5; + */ + const AUDIT_NOT_SUPPORTED = 5; + + private static $valueToName = [ + self::COMPLIANCE_STATE_UNSPECIFIED => 'COMPLIANCE_STATE_UNSPECIFIED', + self::COMPLIANT => 'COMPLIANT', + self::VIOLATION => 'VIOLATION', + self::MANUAL_REVIEW_NEEDED => 'MANUAL_REVIEW_NEEDED', + self::ERROR => 'ERROR', + self::AUDIT_NOT_SUPPORTED => 'AUDIT_NOT_SUPPORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php new file mode 100644 index 000000000000..cb413048b6f8 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php @@ -0,0 +1,407 @@ +google.cloud.auditmanager.v1.Control + */ +class Control extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The control identifier used to fetch the findings. This is + * same as the control report name. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = ''; + /** + * Output only. Display name of the control. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. Group where the control belongs. E.g. Access Control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $family = 0; + /** + * Output only. Regulatory Family of the control E.g. Access Control + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $control_family = null; + /** + * Output only. Regulatory control ask of the control + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + /** + * Output only. The type of responsibility for implementing this control. It + * can be google, customer or shared. + * + * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $responsibility_type = ''; + /** + * Output only. Description of the google responsibility for implementing this + * control. + * + * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_responsibility_description = ''; + /** + * Output only. Implementation of the google responsibility for implementing + * this control. + * + * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_responsibility_implementation = ''; + /** + * Output only. Description of the customer responsibility for implementing + * this control. + * + * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $customer_responsibility_description = ''; + /** + * Output only. Implementation of the customer responsibility for implementing + * this control. + * + * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $customer_responsibility_implementation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Output only. The control identifier used to fetch the findings. This is + * same as the control report name. + * @type string $display_name + * Output only. Display name of the control. + * @type int $family + * Output only. Group where the control belongs. E.g. Access Control. + * @type \Google\Cloud\AuditManager\V1\ControlFamily $control_family + * Output only. Regulatory Family of the control E.g. Access Control + * @type string $description + * Output only. Regulatory control ask of the control + * @type string $responsibility_type + * Output only. The type of responsibility for implementing this control. It + * can be google, customer or shared. + * @type string $google_responsibility_description + * Output only. Description of the google responsibility for implementing this + * control. + * @type string $google_responsibility_implementation + * Output only. Implementation of the google responsibility for implementing + * this control. + * @type string $customer_responsibility_description + * Output only. Description of the customer responsibility for implementing + * this control. + * @type string $customer_responsibility_implementation + * Output only. Implementation of the customer responsibility for implementing + * this control. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The control identifier used to fetch the findings. This is + * same as the control report name. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. The control identifier used to fetch the findings. This is + * same as the control report name. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Output only. Display name of the control. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. Display name of the control. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Group where the control belongs. E.g. Access Control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFamily() + { + return $this->family; + } + + /** + * Output only. Group where the control belongs. E.g. Access Control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFamily($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\Control\Family::class); + $this->family = $var; + + return $this; + } + + /** + * Output only. Regulatory Family of the control E.g. Access Control + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\ControlFamily|null + */ + public function getControlFamily() + { + return $this->control_family; + } + + public function hasControlFamily() + { + return isset($this->control_family); + } + + public function clearControlFamily() + { + unset($this->control_family); + } + + /** + * Output only. Regulatory Family of the control E.g. Access Control + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\ControlFamily $var + * @return $this + */ + public function setControlFamily($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ControlFamily::class); + $this->control_family = $var; + + return $this; + } + + /** + * Output only. Regulatory control ask of the control + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. Regulatory control ask of the control + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The type of responsibility for implementing this control. It + * can be google, customer or shared. + * + * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getResponsibilityType() + { + return $this->responsibility_type; + } + + /** + * Output only. The type of responsibility for implementing this control. It + * can be google, customer or shared. + * + * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setResponsibilityType($var) + { + GPBUtil::checkString($var, True); + $this->responsibility_type = $var; + + return $this; + } + + /** + * Output only. Description of the google responsibility for implementing this + * control. + * + * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGoogleResponsibilityDescription() + { + return $this->google_responsibility_description; + } + + /** + * Output only. Description of the google responsibility for implementing this + * control. + * + * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGoogleResponsibilityDescription($var) + { + GPBUtil::checkString($var, True); + $this->google_responsibility_description = $var; + + return $this; + } + + /** + * Output only. Implementation of the google responsibility for implementing + * this control. + * + * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGoogleResponsibilityImplementation() + { + return $this->google_responsibility_implementation; + } + + /** + * Output only. Implementation of the google responsibility for implementing + * this control. + * + * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGoogleResponsibilityImplementation($var) + { + GPBUtil::checkString($var, True); + $this->google_responsibility_implementation = $var; + + return $this; + } + + /** + * Output only. Description of the customer responsibility for implementing + * this control. + * + * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCustomerResponsibilityDescription() + { + return $this->customer_responsibility_description; + } + + /** + * Output only. Description of the customer responsibility for implementing + * this control. + * + * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCustomerResponsibilityDescription($var) + { + GPBUtil::checkString($var, True); + $this->customer_responsibility_description = $var; + + return $this; + } + + /** + * Output only. Implementation of the customer responsibility for implementing + * this control. + * + * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCustomerResponsibilityImplementation() + { + return $this->customer_responsibility_implementation; + } + + /** + * Output only. Implementation of the customer responsibility for implementing + * this control. + * + * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCustomerResponsibilityImplementation($var) + { + GPBUtil::checkString($var, True); + $this->customer_responsibility_implementation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php new file mode 100644 index 000000000000..2886d52f8770 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php @@ -0,0 +1,176 @@ +google.cloud.auditmanager.v1.Control.Family + */ +class Family +{ + /** + * Unspecified. Invalid state. + * + * Generated from protobuf enum FAMILY_UNSPECIFIED = 0; + */ + const FAMILY_UNSPECIFIED = 0; + /** + * Access Control + * + * Generated from protobuf enum AC = 1; + */ + const AC = 1; + /** + * Awareness and Training + * + * Generated from protobuf enum AT = 2; + */ + const AT = 2; + /** + * Audit and Accountability + * + * Generated from protobuf enum AU = 3; + */ + const AU = 3; + /** + * Certification, Accreditation and Security Assessments + * + * Generated from protobuf enum CA = 4; + */ + const CA = 4; + /** + * Configuration Management + * + * Generated from protobuf enum CM = 5; + */ + const CM = 5; + /** + * Contingency Planning + * + * Generated from protobuf enum CP = 6; + */ + const CP = 6; + /** + * Identification and Authentication + * + * Generated from protobuf enum IA = 7; + */ + const IA = 7; + /** + * Incident Response + * + * Generated from protobuf enum IR = 8; + */ + const IR = 8; + /** + * Maintenance + * + * Generated from protobuf enum MA = 9; + */ + const MA = 9; + /** + * Media Protection + * + * Generated from protobuf enum MP = 10; + */ + const MP = 10; + /** + * Physical and Environmental Protection + * + * Generated from protobuf enum PE = 11; + */ + const PE = 11; + /** + * Security Planning + * + * Generated from protobuf enum PL = 12; + */ + const PL = 12; + /** + * Personnel Security + * + * Generated from protobuf enum PS = 13; + */ + const PS = 13; + /** + * Risk Assessment + * + * Generated from protobuf enum RA = 14; + */ + const RA = 14; + /** + * System Services and Acquisition + * + * Generated from protobuf enum SA = 15; + */ + const SA = 15; + /** + * System and Communications Protection + * + * Generated from protobuf enum SC = 16; + */ + const SC = 16; + /** + * System and Information Integrity + * + * Generated from protobuf enum SI = 17; + */ + const SI = 17; + /** + * Supply Chain Risk Management + * + * Generated from protobuf enum SR = 18; + */ + const SR = 18; + + private static $valueToName = [ + self::FAMILY_UNSPECIFIED => 'FAMILY_UNSPECIFIED', + self::AC => 'AC', + self::AT => 'AT', + self::AU => 'AU', + self::CA => 'CA', + self::CM => 'CM', + self::CP => 'CP', + self::IA => 'IA', + self::IR => 'IR', + self::MA => 'MA', + self::MP => 'MP', + self::PE => 'PE', + self::PL => 'PL', + self::PS => 'PS', + self::RA => 'RA', + self::SA => 'SA', + self::SC => 'SC', + self::SI => 'SI', + self::SR => 'SR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Family::class, \Google\Cloud\AuditManager\V1\Control_Family::class); + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php new file mode 100644 index 000000000000..a4f89ebca3ab --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php @@ -0,0 +1,155 @@ +google.cloud.auditmanager.v1.ControlDetails + */ +class ControlDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The control for which the findings are being reported. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; + */ + protected $control = null; + /** + * Output only. Overall status of the findings for the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compliance_state = 0; + /** + * Report summary with compliance, violation counts etc. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; + */ + protected $control_report_summary = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AuditManager\V1\Control $control + * The control for which the findings are being reported. + * @type int $compliance_state + * Output only. Overall status of the findings for the control. + * @type \Google\Cloud\AuditManager\V1\ReportSummary $control_report_summary + * Report summary with compliance, violation counts etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * The control for which the findings are being reported. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; + * @return \Google\Cloud\AuditManager\V1\Control|null + */ + public function getControl() + { + return $this->control; + } + + public function hasControl() + { + return isset($this->control); + } + + public function clearControl() + { + unset($this->control); + } + + /** + * The control for which the findings are being reported. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; + * @param \Google\Cloud\AuditManager\V1\Control $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Control::class); + $this->control = $var; + + return $this; + } + + /** + * Output only. Overall status of the findings for the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getComplianceState() + { + return $this->compliance_state; + } + + /** + * Output only. Overall status of the findings for the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setComplianceState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ComplianceState::class); + $this->compliance_state = $var; + + return $this; + } + + /** + * Report summary with compliance, violation counts etc. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; + * @return \Google\Cloud\AuditManager\V1\ReportSummary|null + */ + public function getControlReportSummary() + { + return $this->control_report_summary; + } + + public function hasControlReportSummary() + { + return isset($this->control_report_summary); + } + + public function clearControlReportSummary() + { + unset($this->control_report_summary); + } + + /** + * Report summary with compliance, violation counts etc. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; + * @param \Google\Cloud\AuditManager\V1\ReportSummary $var + * @return $this + */ + public function setControlReportSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); + $this->control_report_summary = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php new file mode 100644 index 000000000000..0215080003f9 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php @@ -0,0 +1,101 @@ +google.cloud.auditmanager.v1.ControlFamily + */ +class ControlFamily extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the regulatory control family. + * + * Generated from protobuf field string family_id = 1; + */ + protected $family_id = ''; + /** + * The display name of the regulatory control family. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_id + * The ID of the regulatory control family. + * @type string $display_name + * The display name of the regulatory control family. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the regulatory control family. + * + * Generated from protobuf field string family_id = 1; + * @return string + */ + public function getFamilyId() + { + return $this->family_id; + } + + /** + * The ID of the regulatory control family. + * + * Generated from protobuf field string family_id = 1; + * @param string $var + * @return $this + */ + public function setFamilyId($var) + { + GPBUtil::checkString($var, True); + $this->family_id = $var; + + return $this; + } + + /** + * The display name of the regulatory control family. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the regulatory control family. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php new file mode 100644 index 000000000000..9415399f0c85 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php @@ -0,0 +1,75 @@ +google.cloud.auditmanager.v1.DestinationDetails + */ +class DestinationDetails extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_bucket_uri + * The Cloud Storage bucket where the audit report is/will be uploaded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage bucket where the audit report is/will be uploaded. + * + * Generated from protobuf field string gcs_bucket_uri = 1; + * @return string + */ + public function getGcsBucketUri() + { + return $this->readOneof(1); + } + + public function hasGcsBucketUri() + { + return $this->hasOneof(1); + } + + /** + * The Cloud Storage bucket where the audit report is/will be uploaded. + * + * Generated from protobuf field string gcs_bucket_uri = 1; + * @param string $var + * @return $this + */ + public function setGcsBucketUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php new file mode 100644 index 000000000000..ccbbdfd40469 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php @@ -0,0 +1,166 @@ +google.cloud.auditmanager.v1.EnrollResourceRequest + */ +class EnrollResourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource to be enrolled to the audit manager. Scope format + * should be resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * organizations/{organization}/locations/{location} + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = ''; + /** + * Required. List of destination among which customer can choose to upload + * their reports during the audit process. While enrolling at a + * organization/folder level, customer can choose Cloud storage bucket in any + * project. If the audit is triggered at project level using the service agent + * at organization/folder level, all the destination options associated with + * respective organization/folder level service agent will be available to + * auditing projects. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $destinations; + + /** + * @param string $scope Required. The resource to be enrolled to the audit manager. Scope format + * should be resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * organizations/{organization}/locations/{location} + * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations Required. List of destination among which customer can choose to upload + * their reports during the audit process. While enrolling at a + * organization/folder level, customer can choose Cloud storage bucket in any + * project. If the audit is triggered at project level using the service agent + * at organization/folder level, all the destination options associated with + * respective organization/folder level service agent will be available to + * auditing projects. + * + * @return \Google\Cloud\AuditManager\V1\EnrollResourceRequest + * + * @experimental + */ + public static function build(string $scope, array $destinations): self + { + return (new self()) + ->setScope($scope) + ->setDestinations($destinations); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope + * Required. The resource to be enrolled to the audit manager. Scope format + * should be resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * organizations/{organization}/locations/{location} + * @type array<\Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination>|\Google\Protobuf\Internal\RepeatedField $destinations + * Required. List of destination among which customer can choose to upload + * their reports during the audit process. While enrolling at a + * organization/folder level, customer can choose Cloud storage bucket in any + * project. If the audit is triggered at project level using the service agent + * at organization/folder level, all the destination options associated with + * respective organization/folder level service agent will be available to + * auditing projects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource to be enrolled to the audit manager. Scope format + * should be resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * organizations/{organization}/locations/{location} + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. The resource to be enrolled to the audit manager. Scope format + * should be resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * organizations/{organization}/locations/{location} + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Required. List of destination among which customer can choose to upload + * their reports during the audit process. While enrolling at a + * organization/folder level, customer can choose Cloud storage bucket in any + * project. If the audit is triggered at project level using the service agent + * at organization/folder level, all the destination options associated with + * respective organization/folder level service agent will be available to + * auditing projects. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestinations() + { + return $this->destinations; + } + + /** + * Required. List of destination among which customer can choose to upload + * their reports during the audit process. While enrolling at a + * organization/folder level, customer can choose Cloud storage bucket in any + * project. If the audit is triggered at project level using the service agent + * at organization/folder level, all the destination options associated with + * respective organization/folder level service agent will be available to + * auditing projects. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestinations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination::class); + $this->destinations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php new file mode 100644 index 000000000000..bb9570ad4a52 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php @@ -0,0 +1,81 @@ +google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination + */ +class EligibleDestination extends \Google\Protobuf\Internal\Message +{ + protected $eligible_destinations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $eligible_gcs_bucket + * The Cloud Storage bucket location where the audit report and evidences + * can be uploaded during the `GenerateAuditReport` API call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage bucket location where the audit report and evidences + * can be uploaded during the `GenerateAuditReport` API call. + * + * Generated from protobuf field string eligible_gcs_bucket = 3; + * @return string + */ + public function getEligibleGcsBucket() + { + return $this->readOneof(3); + } + + public function hasEligibleGcsBucket() + { + return $this->hasOneof(3); + } + + /** + * The Cloud Storage bucket location where the audit report and evidences + * can be uploaded during the `GenerateAuditReport` API call. + * + * Generated from protobuf field string eligible_gcs_bucket = 3; + * @param string $var + * @return $this + */ + public function setEligibleGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getEligibleDestinations() + { + return $this->whichOneof("eligible_destinations"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EligibleDestination::class, \Google\Cloud\AuditManager\V1\EnrollResourceRequest_EligibleDestination::class); + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php new file mode 100644 index 000000000000..40f13d3b4aac --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php @@ -0,0 +1,105 @@ +google.cloud.auditmanager.v1.Enrollment + */ +class Enrollment extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this Enrollment, in the format of scope given in + * request. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The locations where the generated reports can be uploaded. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $destination_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this Enrollment, in the format of scope given in + * request. + * @type array<\Google\Cloud\AuditManager\V1\DestinationDetails>|\Google\Protobuf\Internal\RepeatedField $destination_details + * Output only. The locations where the generated reports can be uploaded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this Enrollment, in the format of scope given in + * request. + * + * 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 Enrollment, in the format of scope given in + * request. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The locations where the generated reports can be uploaded. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestinationDetails() + { + return $this->destination_details; + } + + /** + * Output only. The locations where the generated reports can be uploaded. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AuditManager\V1\DestinationDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestinationDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\DestinationDetails::class); + $this->destination_details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php new file mode 100644 index 000000000000..dea4b2f5a7bd --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php @@ -0,0 +1,259 @@ +google.cloud.auditmanager.v1.GenerateAuditReportRequest + */ +class GenerateAuditReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Scope for which the AuditScopeReport is required. Must be of + * format resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = ''; + /** + * Required. Compliance Standard against which the Scope Report must be + * generated. Eg: FEDRAMP_MODERATE + * + * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $compliance_standard = ''; + /** + * Required. The format in which the audit report should be created. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_format = 0; + /** + * Required. Compliance framework against which the Report must be generated. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $compliance_framework = ''; + protected $destination; + + /** + * @param string $scope Required. Scope for which the AuditScopeReport is required. Must be of + * format resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * @param string $gcsUri Destination Cloud storage bucket where report and evidence must be + * uploaded. The Cloud storage bucket provided here must be selected among + * the buckets entered during the enrollment process. + * @param string $complianceStandard Required. Compliance Standard against which the Scope Report must be + * generated. Eg: FEDRAMP_MODERATE + * @param int $reportFormat Required. The format in which the audit report should be created. + * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat} + * + * @return \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest + * + * @experimental + */ + public static function build(string $scope, string $gcsUri, string $complianceStandard, int $reportFormat): self + { + return (new self()) + ->setScope($scope) + ->setGcsUri($gcsUri) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_uri + * Destination Cloud storage bucket where report and evidence must be + * uploaded. The Cloud storage bucket provided here must be selected among + * the buckets entered during the enrollment process. + * @type string $scope + * Required. Scope for which the AuditScopeReport is required. Must be of + * format resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * @type string $compliance_standard + * Required. Compliance Standard against which the Scope Report must be + * generated. Eg: FEDRAMP_MODERATE + * @type int $report_format + * Required. The format in which the audit report should be created. + * @type string $compliance_framework + * Required. Compliance framework against which the Report must be generated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Destination Cloud storage bucket where report and evidence must be + * uploaded. The Cloud storage bucket provided here must be selected among + * the buckets entered during the enrollment process. + * + * Generated from protobuf field string gcs_uri = 2; + * @return string + */ + public function getGcsUri() + { + return $this->readOneof(2); + } + + public function hasGcsUri() + { + return $this->hasOneof(2); + } + + /** + * Destination Cloud storage bucket where report and evidence must be + * uploaded. The Cloud storage bucket provided here must be selected among + * the buckets entered during the enrollment process. + * + * Generated from protobuf field string gcs_uri = 2; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. Scope for which the AuditScopeReport is required. Must be of + * format resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Scope for which the AuditScopeReport is required. Must be of + * format resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Required. Compliance Standard against which the Scope Report must be + * generated. Eg: FEDRAMP_MODERATE + * + * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getComplianceStandard() + { + return $this->compliance_standard; + } + + /** + * Required. Compliance Standard against which the Scope Report must be + * generated. Eg: FEDRAMP_MODERATE + * + * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setComplianceStandard($var) + { + GPBUtil::checkString($var, True); + $this->compliance_standard = $var; + + return $this; + } + + /** + * Required. The format in which the audit report should be created. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReportFormat() + { + return $this->report_format; + } + + /** + * Required. The format in which the audit report should be created. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReportFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat::class); + $this->report_format = $var; + + return $this; + } + + /** + * Required. Compliance framework against which the Report must be generated. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getComplianceFramework() + { + return $this->compliance_framework; + } + + /** + * Required. Compliance framework against which the Report must be generated. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setComplianceFramework($var) + { + GPBUtil::checkString($var, True); + $this->compliance_framework = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php new file mode 100644 index 000000000000..742f86822471 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php @@ -0,0 +1,57 @@ +google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat + */ +class AuditReportFormat +{ + /** + * Unspecified. Invalid state. + * + * Generated from protobuf enum AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; + */ + const AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; + /** + * Audit Report creation format is Open Document. + * + * Generated from protobuf enum AUDIT_REPORT_FORMAT_ODF = 1; + */ + const AUDIT_REPORT_FORMAT_ODF = 1; + + private static $valueToName = [ + self::AUDIT_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_REPORT_FORMAT_UNSPECIFIED', + self::AUDIT_REPORT_FORMAT_ODF => 'AUDIT_REPORT_FORMAT_ODF', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AuditReportFormat::class, \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest_AuditReportFormat::class); + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php new file mode 100644 index 000000000000..fe0ff8bcfef7 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php @@ -0,0 +1,211 @@ +google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest + */ +class GenerateAuditScopeReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Scope for which the AuditScopeReport is required. Must be of + * format resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * + * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = ''; + /** + * Required. Compliance Standard against which the Scope Report must be + * generated. Eg: FEDRAMP_MODERATE + * + * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $compliance_standard = ''; + /** + * Required. The format in which the Scope report bytes should be returned. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_format = 0; + /** + * Required. Compliance framework against which the Scope Report must be + * generated. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $compliance_framework = ''; + + /** + * @param string $scope Required. Scope for which the AuditScopeReport is required. Must be of + * format resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * @param string $complianceStandard Required. Compliance Standard against which the Scope Report must be + * generated. Eg: FEDRAMP_MODERATE + * @param int $reportFormat Required. The format in which the Scope report bytes should be returned. + * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat} + * + * @return \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest + * + * @experimental + */ + public static function build(string $scope, string $complianceStandard, int $reportFormat): self + { + return (new self()) + ->setScope($scope) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope + * Required. Scope for which the AuditScopeReport is required. Must be of + * format resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * @type string $compliance_standard + * Required. Compliance Standard against which the Scope Report must be + * generated. Eg: FEDRAMP_MODERATE + * @type int $report_format + * Required. The format in which the Scope report bytes should be returned. + * @type string $compliance_framework + * Required. Compliance framework against which the Scope Report must be + * generated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Scope for which the AuditScopeReport is required. Must be of + * format resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * + * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Scope for which the AuditScopeReport is required. Must be of + * format resource_type/resource_identifier Eg: + * projects/{project}/locations/{location}, + * folders/{folder}/locations/{location} + * + * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Required. Compliance Standard against which the Scope Report must be + * generated. Eg: FEDRAMP_MODERATE + * + * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getComplianceStandard() + { + return $this->compliance_standard; + } + + /** + * Required. Compliance Standard against which the Scope Report must be + * generated. Eg: FEDRAMP_MODERATE + * + * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setComplianceStandard($var) + { + GPBUtil::checkString($var, True); + $this->compliance_standard = $var; + + return $this; + } + + /** + * Required. The format in which the Scope report bytes should be returned. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReportFormat() + { + return $this->report_format; + } + + /** + * Required. The format in which the Scope report bytes should be returned. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReportFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat::class); + $this->report_format = $var; + + return $this; + } + + /** + * Required. Compliance framework against which the Scope Report must be + * generated. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getComplianceFramework() + { + return $this->compliance_framework; + } + + /** + * Required. Compliance framework against which the Scope Report must be + * generated. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setComplianceFramework($var) + { + GPBUtil::checkString($var, True); + $this->compliance_framework = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php new file mode 100644 index 000000000000..8bfd8b87c8ad --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php @@ -0,0 +1,57 @@ +google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat + */ +class AuditScopeReportFormat +{ + /** + * Unspecified. Invalid format. + * + * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; + */ + const AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; + /** + * Audit Scope Report creation format is Open Document. + * + * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; + */ + const AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; + + private static $valueToName = [ + self::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED', + self::AUDIT_SCOPE_REPORT_FORMAT_ODF => 'AUDIT_SCOPE_REPORT_FORMAT_ODF', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AuditScopeReportFormat::class, \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest_AuditScopeReportFormat::class); + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php new file mode 100644 index 000000000000..f8fe2b3be2af --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php @@ -0,0 +1,91 @@ +google.cloud.auditmanager.v1.GetAuditReportRequest + */ +class GetAuditReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format + * projects/{project}/locations/{location}/auditReports/{audit_report}, + * folders/{folder}/locations/{location}/auditReports/{audit_report} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Format + * projects/{project}/locations/{location}/auditReports/{audit_report}, + * folders/{folder}/locations/{location}/auditReports/{audit_report} + * Please see {@see AuditManagerClient::auditReportName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\GetAuditReportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format + * projects/{project}/locations/{location}/auditReports/{audit_report}, + * folders/{folder}/locations/{location}/auditReports/{audit_report} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format + * projects/{project}/locations/{location}/auditReports/{audit_report}, + * folders/{folder}/locations/{location}/auditReports/{audit_report} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format + * projects/{project}/locations/{location}/auditReports/{audit_report}, + * folders/{folder}/locations/{location}/auditReports/{audit_report} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php new file mode 100644 index 000000000000..ccf270941f4d --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php @@ -0,0 +1,96 @@ +google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest + */ +class GetResourceEnrollmentStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format + * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, + * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, + * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Format + * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, + * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, + * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * Please see {@see AuditManagerClient::resourceEnrollmentStatusName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\GetResourceEnrollmentStatusRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format + * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, + * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, + * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format + * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, + * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, + * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format + * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, + * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, + * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php new file mode 100644 index 000000000000..8f1ade60482d --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php @@ -0,0 +1,153 @@ +google.cloud.auditmanager.v1.ListAuditReportsRequest + */ +class ListAuditReportsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent scope for which to list the reports. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of resources to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent scope for which to list the reports. Please see + * {@see AuditManagerClient::folderLocationName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\ListAuditReportsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent scope for which to list the reports. + * @type int $page_size + * Optional. The maximum number of resources to return. + * @type string $page_token + * Optional. The next_page_token value returned from a previous List request, + * if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent scope for which to list the reports. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent scope for which to list the reports. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 resources to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of resources to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php new file mode 100644 index 000000000000..b34bd51a69de --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php @@ -0,0 +1,101 @@ +google.cloud.auditmanager.v1.ListAuditReportsResponse + */ +class ListAuditReportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The audit reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $audit_reports; + /** + * Output only. The token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AuditManager\V1\AuditReport>|\Google\Protobuf\Internal\RepeatedField $audit_reports + * Output only. The audit reports. + * @type string $next_page_token + * Output only. The token to retrieve the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The audit reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAuditReports() + { + return $this->audit_reports; + } + + /** + * Output only. The audit reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AuditManager\V1\AuditReport>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAuditReports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\AuditReport::class); + $this->audit_reports = $arr; + + return $this; + } + + /** + * Output only. The token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. The token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php new file mode 100644 index 000000000000..eb9b8e37a7b2 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php @@ -0,0 +1,163 @@ +google.cloud.auditmanager.v1.ListControlsRequest + */ +class ListControlsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format + * projects/{project}/locations/{location}/standards/{standard}, + * folders/{folder}/locations/{location}/standards/{standard} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of resources to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Format + * projects/{project}/locations/{location}/standards/{standard}, + * folders/{folder}/locations/{location}/standards/{standard} + * Please see {@see AuditManagerClient::standardName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\ListControlsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format + * projects/{project}/locations/{location}/standards/{standard}, + * folders/{folder}/locations/{location}/standards/{standard} + * @type int $page_size + * Optional. The maximum number of resources to return. + * @type string $page_token + * Optional. The next_page_token value returned from a previous List request, + * if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format + * projects/{project}/locations/{location}/standards/{standard}, + * folders/{folder}/locations/{location}/standards/{standard} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format + * projects/{project}/locations/{location}/standards/{standard}, + * folders/{folder}/locations/{location}/standards/{standard} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 resources to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of resources to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php new file mode 100644 index 000000000000..411b54dd886e --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php @@ -0,0 +1,101 @@ +google.cloud.auditmanager.v1.ListControlsResponse + */ +class ListControlsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The controls for the compliance standard. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $controls; + /** + * Output only. The token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AuditManager\V1\Control>|\Google\Protobuf\Internal\RepeatedField $controls + * Output only. The controls for the compliance standard. + * @type string $next_page_token + * Output only. The token to retrieve the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The controls for the compliance standard. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getControls() + { + return $this->controls; + } + + /** + * Output only. The controls for the compliance standard. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AuditManager\V1\Control>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setControls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\Control::class); + $this->controls = $arr; + + return $this; + } + + /** + * Output only. The token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. The token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php new file mode 100644 index 000000000000..fc57a61755ae --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php @@ -0,0 +1,159 @@ +google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest + */ +class ListResourceEnrollmentStatusesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent scope for which the list of resources with enrollments + * are required. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of resources to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent scope for which the list of resources with enrollments + * are required. Please see + * {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent scope for which the list of resources with enrollments + * are required. + * @type int $page_size + * Optional. The maximum number of resources to return. + * @type string $page_token + * Optional. The next_page_token value returned from a previous List request, + * if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent scope for which the list of resources with enrollments + * are required. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent scope for which the list of resources with enrollments + * are required. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 resources to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of resources to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php new file mode 100644 index 000000000000..1c75e14711ee --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php @@ -0,0 +1,101 @@ +google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse + */ +class ListResourceEnrollmentStatusesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resources with their enrollment status. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; + */ + private $resource_enrollment_statuses; + /** + * Output only. The token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus>|\Google\Protobuf\Internal\RepeatedField $resource_enrollment_statuses + * The resources with their enrollment status. + * @type string $next_page_token + * Output only. The token to retrieve the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * The resources with their enrollment status. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceEnrollmentStatuses() + { + return $this->resource_enrollment_statuses; + } + + /** + * The resources with their enrollment status. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; + * @param array<\Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceEnrollmentStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus::class); + $this->resource_enrollment_statuses = $arr; + + return $this; + } + + /** + * Output only. The token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. The token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php new file mode 100644 index 000000000000..6baf524d9a02 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.auditmanager.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php new file mode 100644 index 000000000000..8abd675373a4 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php @@ -0,0 +1,105 @@ +google.cloud.auditmanager.v1.OperationState + */ +class OperationState +{ + /** + * Unspecified. Invalid state. + * + * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; + */ + const OPERATION_STATE_UNSPECIFIED = 0; + /** + * Audit report generation process has not started. + * + * Generated from protobuf enum OPERATION_STATE_NOT_STARTED = 10; + */ + const OPERATION_STATE_NOT_STARTED = 10; + /** + * Audit Manager is currently evaluating the workloads against specific + * standard. + * + * Generated from protobuf enum OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; + */ + const OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; + /** + * Audit Manager has completed Evaluation for the workload. + * + * Generated from protobuf enum OPERATION_STATE_EVALUATION_DONE = 21; + */ + const OPERATION_STATE_EVALUATION_DONE = 21; + /** + * Audit Manager is creating audit report from the evaluated data. + * + * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; + */ + const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; + /** + * Audit Manager has completed generation of the audit report. + * + * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; + */ + const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; + /** + * Audit Manager is uploading the audit report and evidences to the customer + * provided destination. + * + * Generated from protobuf enum OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; + */ + const OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; + /** + * Audit report generation process is completed. + * + * Generated from protobuf enum OPERATION_STATE_DONE = 50; + */ + const OPERATION_STATE_DONE = 50; + /** + * Audit report generation process has failed. + * + * Generated from protobuf enum OPERATION_STATE_FAILED = 60; + */ + const OPERATION_STATE_FAILED = 60; + + private static $valueToName = [ + self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', + self::OPERATION_STATE_NOT_STARTED => 'OPERATION_STATE_NOT_STARTED', + self::OPERATION_STATE_EVALUATION_IN_PROGRESS => 'OPERATION_STATE_EVALUATION_IN_PROGRESS', + self::OPERATION_STATE_EVALUATION_DONE => 'OPERATION_STATE_EVALUATION_DONE', + self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS', + self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE', + self::OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS', + self::OPERATION_STATE_DONE => 'OPERATION_STATE_DONE', + self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php new file mode 100644 index 000000000000..8aab4c6e7dfe --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php @@ -0,0 +1,321 @@ +google.cloud.auditmanager.v1.ReportGenerationProgress + */ +class ReportGenerationProgress extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current state of execution for report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. States the reason of failure during the audit report + * generation process. This field is set only if the state attribute is + * OPERATION_STATE_FAILED. + * + * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_reason = ''; + /** + * Shows the progress of the CESS service evaluation process. The progress is + * defined in terms of percentage complete and is being fetched from the CESS + * service. + * + * Generated from protobuf field double evaluation_percent_complete = 20; + */ + protected $evaluation_percent_complete = 0.0; + /** + * Shows the report generation progress of the CESS Result Processor Service. + * The // progress is defined in terms of percentage complete and is being + * fetched from the CESS service. If report_generation_in_progress is non zero + * then evaluation_percent_complete will be 100%. + * + * Generated from protobuf field double report_generation_percent_complete = 30; + */ + protected $report_generation_percent_complete = 0.0; + /** + * Shows the report uploading progress of the CESS Result Processor Service. + * The progress is defined in terms of percentage complete and is being + * fetched from the CESS service. If report_uploading_in_progress is non zero + * then evaluation_percent_complete and report_generation_percent_complete + * will be 100%. + * + * Generated from protobuf field double report_uploading_percent_complete = 40; + */ + protected $report_uploading_percent_complete = 0.0; + /** + * Output only. The Cloud Storage bucket where the audit report will be + * uploaded once the evaluation process is completed. + * + * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destination_gcs_bucket = ''; + /** + * Output only. The name of the audit report. + * + * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $audit_report = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. The current state of execution for report generation. + * @type string $failure_reason + * Output only. States the reason of failure during the audit report + * generation process. This field is set only if the state attribute is + * OPERATION_STATE_FAILED. + * @type float $evaluation_percent_complete + * Shows the progress of the CESS service evaluation process. The progress is + * defined in terms of percentage complete and is being fetched from the CESS + * service. + * @type float $report_generation_percent_complete + * Shows the report generation progress of the CESS Result Processor Service. + * The // progress is defined in terms of percentage complete and is being + * fetched from the CESS service. If report_generation_in_progress is non zero + * then evaluation_percent_complete will be 100%. + * @type float $report_uploading_percent_complete + * Shows the report uploading progress of the CESS Result Processor Service. + * The progress is defined in terms of percentage complete and is being + * fetched from the CESS service. If report_uploading_in_progress is non zero + * then evaluation_percent_complete and report_generation_percent_complete + * will be 100%. + * @type string $destination_gcs_bucket + * Output only. The Cloud Storage bucket where the audit report will be + * uploaded once the evaluation process is completed. + * @type string $audit_report + * Output only. The name of the audit report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current state of execution for report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of execution for report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. States the reason of failure during the audit report + * generation process. This field is set only if the state attribute is + * OPERATION_STATE_FAILED. + * + * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFailureReason() + { + return $this->failure_reason; + } + + /** + * Output only. States the reason of failure during the audit report + * generation process. This field is set only if the state attribute is + * OPERATION_STATE_FAILED. + * + * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFailureReason($var) + { + GPBUtil::checkString($var, True); + $this->failure_reason = $var; + + return $this; + } + + /** + * Shows the progress of the CESS service evaluation process. The progress is + * defined in terms of percentage complete and is being fetched from the CESS + * service. + * + * Generated from protobuf field double evaluation_percent_complete = 20; + * @return float + */ + public function getEvaluationPercentComplete() + { + return $this->evaluation_percent_complete; + } + + /** + * Shows the progress of the CESS service evaluation process. The progress is + * defined in terms of percentage complete and is being fetched from the CESS + * service. + * + * Generated from protobuf field double evaluation_percent_complete = 20; + * @param float $var + * @return $this + */ + public function setEvaluationPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->evaluation_percent_complete = $var; + + return $this; + } + + /** + * Shows the report generation progress of the CESS Result Processor Service. + * The // progress is defined in terms of percentage complete and is being + * fetched from the CESS service. If report_generation_in_progress is non zero + * then evaluation_percent_complete will be 100%. + * + * Generated from protobuf field double report_generation_percent_complete = 30; + * @return float + */ + public function getReportGenerationPercentComplete() + { + return $this->report_generation_percent_complete; + } + + /** + * Shows the report generation progress of the CESS Result Processor Service. + * The // progress is defined in terms of percentage complete and is being + * fetched from the CESS service. If report_generation_in_progress is non zero + * then evaluation_percent_complete will be 100%. + * + * Generated from protobuf field double report_generation_percent_complete = 30; + * @param float $var + * @return $this + */ + public function setReportGenerationPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->report_generation_percent_complete = $var; + + return $this; + } + + /** + * Shows the report uploading progress of the CESS Result Processor Service. + * The progress is defined in terms of percentage complete and is being + * fetched from the CESS service. If report_uploading_in_progress is non zero + * then evaluation_percent_complete and report_generation_percent_complete + * will be 100%. + * + * Generated from protobuf field double report_uploading_percent_complete = 40; + * @return float + */ + public function getReportUploadingPercentComplete() + { + return $this->report_uploading_percent_complete; + } + + /** + * Shows the report uploading progress of the CESS Result Processor Service. + * The progress is defined in terms of percentage complete and is being + * fetched from the CESS service. If report_uploading_in_progress is non zero + * then evaluation_percent_complete and report_generation_percent_complete + * will be 100%. + * + * Generated from protobuf field double report_uploading_percent_complete = 40; + * @param float $var + * @return $this + */ + public function setReportUploadingPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->report_uploading_percent_complete = $var; + + return $this; + } + + /** + * Output only. The Cloud Storage bucket where the audit report will be + * uploaded once the evaluation process is completed. + * + * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDestinationGcsBucket() + { + return $this->destination_gcs_bucket; + } + + /** + * Output only. The Cloud Storage bucket where the audit report will be + * uploaded once the evaluation process is completed. + * + * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDestinationGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->destination_gcs_bucket = $var; + + return $this; + } + + /** + * Output only. The name of the audit report. + * + * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getAuditReport() + { + return $this->audit_report; + } + + /** + * Output only. The name of the audit report. + * + * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuditReport($var) + { + GPBUtil::checkString($var, True); + $this->audit_report = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php new file mode 100644 index 000000000000..f1521d5ed1d6 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php @@ -0,0 +1,203 @@ +google.cloud.auditmanager.v1.ReportSummary + */ +class ReportSummary extends \Google\Protobuf\Internal\Message +{ + /** + * Total number of checks. + * + * Generated from protobuf field int32 total_count = 1; + */ + protected $total_count = 0; + /** + * Number of compliant checks. + * + * Generated from protobuf field int32 compliant_count = 2; + */ + protected $compliant_count = 0; + /** + * Number of checks with violations. + * + * Generated from protobuf field int32 violation_count = 3; + */ + protected $violation_count = 0; + /** + * Number of checks with "manual review needed" status. + * + * Generated from protobuf field int32 manual_review_needed_count = 4; + */ + protected $manual_review_needed_count = 0; + /** + * Number of checks that could not be performed due to errors. + * + * Generated from protobuf field int32 error_count = 5; + */ + protected $error_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $total_count + * Total number of checks. + * @type int $compliant_count + * Number of compliant checks. + * @type int $violation_count + * Number of checks with violations. + * @type int $manual_review_needed_count + * Number of checks with "manual review needed" status. + * @type int $error_count + * Number of checks that could not be performed due to errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Total number of checks. + * + * Generated from protobuf field int32 total_count = 1; + * @return int + */ + public function getTotalCount() + { + return $this->total_count; + } + + /** + * Total number of checks. + * + * Generated from protobuf field int32 total_count = 1; + * @param int $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt32($var); + $this->total_count = $var; + + return $this; + } + + /** + * Number of compliant checks. + * + * Generated from protobuf field int32 compliant_count = 2; + * @return int + */ + public function getCompliantCount() + { + return $this->compliant_count; + } + + /** + * Number of compliant checks. + * + * Generated from protobuf field int32 compliant_count = 2; + * @param int $var + * @return $this + */ + public function setCompliantCount($var) + { + GPBUtil::checkInt32($var); + $this->compliant_count = $var; + + return $this; + } + + /** + * Number of checks with violations. + * + * Generated from protobuf field int32 violation_count = 3; + * @return int + */ + public function getViolationCount() + { + return $this->violation_count; + } + + /** + * Number of checks with violations. + * + * Generated from protobuf field int32 violation_count = 3; + * @param int $var + * @return $this + */ + public function setViolationCount($var) + { + GPBUtil::checkInt32($var); + $this->violation_count = $var; + + return $this; + } + + /** + * Number of checks with "manual review needed" status. + * + * Generated from protobuf field int32 manual_review_needed_count = 4; + * @return int + */ + public function getManualReviewNeededCount() + { + return $this->manual_review_needed_count; + } + + /** + * Number of checks with "manual review needed" status. + * + * Generated from protobuf field int32 manual_review_needed_count = 4; + * @param int $var + * @return $this + */ + public function setManualReviewNeededCount($var) + { + GPBUtil::checkInt32($var); + $this->manual_review_needed_count = $var; + + return $this; + } + + /** + * Number of checks that could not be performed due to errors. + * + * Generated from protobuf field int32 error_count = 5; + * @return int + */ + public function getErrorCount() + { + return $this->error_count; + } + + /** + * Number of checks that could not be performed due to errors. + * + * Generated from protobuf field int32 error_count = 5; + * @param int $var + * @return $this + */ + public function setErrorCount($var) + { + GPBUtil::checkInt32($var); + $this->error_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php new file mode 100644 index 000000000000..0df173c817c8 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php @@ -0,0 +1,224 @@ +google.cloud.auditmanager.v1.ResourceEnrollmentStatus + */ +class ResourceEnrollmentStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Enrollment which contains enrolled destination details for a + * resource + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $enrollment = null; + /** + * Output only. Is resource enrolled. + * + * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $enrolled = false; + /** + * Output only. Display name of the project/folder/organization. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. Enrollment state of the resource. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $enrollment_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this resource. + * @type \Google\Cloud\AuditManager\V1\Enrollment $enrollment + * Output only. Enrollment which contains enrolled destination details for a + * resource + * @type bool $enrolled + * Output only. Is resource enrolled. + * @type string $display_name + * Output only. Display name of the project/folder/organization. + * @type int $enrollment_state + * Output only. Enrollment state of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this resource. + * + * 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 resource. + * + * 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. Enrollment which contains enrolled destination details for a + * resource + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\Enrollment|null + */ + public function getEnrollment() + { + return $this->enrollment; + } + + public function hasEnrollment() + { + return isset($this->enrollment); + } + + public function clearEnrollment() + { + unset($this->enrollment); + } + + /** + * Output only. Enrollment which contains enrolled destination details for a + * resource + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\Enrollment $var + * @return $this + */ + public function setEnrollment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Enrollment::class); + $this->enrollment = $var; + + return $this; + } + + /** + * Output only. Is resource enrolled. + * + * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + * @deprecated + */ + public function getEnrolled() + { + if ($this->enrolled !== false) { + @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); + } + return $this->enrolled; + } + + /** + * Output only. Is resource enrolled. + * + * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setEnrolled($var) + { + @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->enrolled = $var; + + return $this; + } + + /** + * Output only. Display name of the project/folder/organization. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. Display name of the project/folder/organization. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Enrollment state of the resource. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEnrollmentState() + { + return $this->enrollment_state; + } + + /** + * Output only. Enrollment state of the resource. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEnrollmentState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus\ResourceEnrollmentState::class); + $this->enrollment_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php new file mode 100644 index 000000000000..5837eb0b14a1 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php @@ -0,0 +1,71 @@ +google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState + */ +class ResourceEnrollmentState +{ + /** + * Unspecified. Invalid state. + * + * Generated from protobuf enum RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; + */ + const RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; + /** + * Not enrolled. + * + * Generated from protobuf enum NOT_ENROLLED = 1; + */ + const NOT_ENROLLED = 1; + /** + * Resource is not enrolled but the parent is enrolled. + * + * Generated from protobuf enum INHERITED = 2; + */ + const INHERITED = 2; + /** + * Enrolled. + * + * Generated from protobuf enum ENROLLED = 3; + */ + const ENROLLED = 3; + + private static $valueToName = [ + self::RESOURCE_ENROLLMENT_STATE_UNSPECIFIED => 'RESOURCE_ENROLLMENT_STATE_UNSPECIFIED', + self::NOT_ENROLLED => 'NOT_ENROLLED', + self::INHERITED => 'INHERITED', + self::ENROLLED => 'ENROLLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResourceEnrollmentState::class, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus_ResourceEnrollmentState::class); + diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php new file mode 100644 index 000000000000..1a5418fe6f06 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php @@ -0,0 +1,81 @@ +setScope($scope) + ->setDestinations($destinations); + + // Call the API and handle any network failures. + try { + /** @var Enrollment $response */ + $response = $auditManagerClient->enrollResource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $scope = '[SCOPE]'; + + enroll_resource_sample($scope); +} +// [END auditmanager_v1_generated_AuditManager_EnrollResource_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php new file mode 100644 index 000000000000..778e7c321587 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php @@ -0,0 +1,101 @@ +setScope($scope) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $auditManagerClient->generateAuditReport($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuditReport $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $scope = '[SCOPE]'; + $complianceStandard = '[COMPLIANCE_STANDARD]'; + $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; + + generate_audit_report_sample($scope, $complianceStandard, $reportFormat, $complianceFramework); +} +// [END auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php new file mode 100644 index 000000000000..07796a5927be --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php @@ -0,0 +1,96 @@ +setScope($scope) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + + // Call the API and handle any network failures. + try { + /** @var AuditScopeReport $response */ + $response = $auditManagerClient->generateAuditScopeReport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $scope = '[SCOPE]'; + $complianceStandard = '[COMPLIANCE_STANDARD]'; + $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; + + generate_audit_scope_report_sample( + $scope, + $complianceStandard, + $reportFormat, + $complianceFramework + ); +} +// [END auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php new file mode 100644 index 000000000000..fe898f54cd38 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AuditReport $response */ + $response = $auditManagerClient->getAuditReport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AuditManagerClient::auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); + + get_audit_report_sample($formattedName); +} +// [END auditmanager_v1_generated_AuditManager_GetAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php new file mode 100644 index 000000000000..1dea4b7c3f71 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/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 auditmanager_v1_generated_AuditManager_GetLocation_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php new file mode 100644 index 000000000000..5847394ae22a --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ResourceEnrollmentStatus $response */ + $response = $auditManagerClient->getResourceEnrollmentStatus($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AuditManagerClient::resourceEnrollmentStatusName( + '[FOLDER]', + '[LOCATION]', + '[RESOURCE_ENROLLMENT_STATUS]' + ); + + get_resource_enrollment_status_sample($formattedName); +} +// [END auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php new file mode 100644 index 000000000000..5237cc95bf1d --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $auditManagerClient->listAuditReports($request); + + /** @var AuditReport $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AuditManagerClient::folderLocationName('[FOLDER]', '[LOCATION]'); + + list_audit_reports_sample($formattedParent); +} +// [END auditmanager_v1_generated_AuditManager_ListAuditReports_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php new file mode 100644 index 000000000000..23dad617a496 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $auditManagerClient->listControls($request); + + /** @var Control $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AuditManagerClient::standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); + + list_controls_sample($formattedParent); +} +// [END auditmanager_v1_generated_AuditManager_ListControls_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php new file mode 100644 index 000000000000..ccceb62bf8af --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php @@ -0,0 +1,69 @@ +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 auditmanager_v1_generated_AuditManager_ListLocations_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php new file mode 100644 index 000000000000..2e9fe28a0ab6 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $auditManagerClient->listResourceEnrollmentStatuses($request); + + /** @var ResourceEnrollmentStatus $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AuditManagerClient::enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); + + list_resource_enrollment_statuses_sample($formattedParent); +} +// [END auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync] diff --git a/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php b/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php new file mode 100644 index 000000000000..076bac4ee300 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php @@ -0,0 +1,855 @@ + enrollResourceAsync(EnrollResourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateAuditReportAsync(GenerateAuditReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateAuditScopeReportAsync(GenerateAuditScopeReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAuditReportAsync(GetAuditReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface getResourceEnrollmentStatusAsync(GetResourceEnrollmentStatusRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAuditReportsAsync(ListAuditReportsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listControlsAsync(ListControlsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listResourceEnrollmentStatusesAsync(ListResourceEnrollmentStatusesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class AuditManagerClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.auditmanager.v1.AuditManager'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'auditmanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'auditmanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/audit_manager_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/audit_manager_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/audit_manager_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/audit_manager_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a audit_report + * resource. + * + * @param string $project + * @param string $location + * @param string $auditReport + * + * @return string The formatted audit_report resource. + */ + public static function auditReportName(string $project, string $location, string $auditReport): string + { + return self::getPathTemplate('auditReport')->render([ + 'project' => $project, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * enrollment_status_scope resource. + * + * @param string $folder + * @param string $location + * + * @return string The formatted enrollment_status_scope resource. + */ + public static function enrollmentStatusScopeName(string $folder, string $location): string + { + return self::getPathTemplate('enrollmentStatusScope')->render([ + 'folder' => $folder, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location resource. + * + * @param string $folder + * @param string $location + * + * @return string The formatted folder_location resource. + */ + public static function folderLocationName(string $folder, string $location): string + { + return self::getPathTemplate('folderLocation')->render([ + 'folder' => $folder, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_audit_report resource. + * + * @param string $folder + * @param string $location + * @param string $auditReport + * + * @return string The formatted folder_location_audit_report resource. + */ + public static function folderLocationAuditReportName(string $folder, string $location, string $auditReport): string + { + return self::getPathTemplate('folderLocationAuditReport')->render([ + 'folder' => $folder, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_resource_enrollment_status resource. + * + * @param string $folder + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted folder_location_resource_enrollment_status resource. + */ + public static function folderLocationResourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('folderLocationResourceEnrollmentStatus')->render([ + 'folder' => $folder, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_standard resource. + * + * @param string $folder + * @param string $location + * @param string $standard + * + * @return string The formatted folder_location_standard resource. + */ + public static function folderLocationStandardName(string $folder, string $location, string $standard): string + { + return self::getPathTemplate('folderLocationStandard')->render([ + 'folder' => $folder, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * 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 + * organization_location resource. + * + * @param string $organization + * @param string $location + * + * @return string The formatted organization_location resource. + */ + public static function organizationLocationName(string $organization, string $location): string + { + return self::getPathTemplate('organizationLocation')->render([ + 'organization' => $organization, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_resource_enrollment_status resource. + * + * @param string $organization + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted organization_location_resource_enrollment_status resource. + */ + public static function organizationLocationResourceEnrollmentStatusName(string $organization, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('organizationLocationResourceEnrollmentStatus')->render([ + 'organization' => $organization, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_standard resource. + * + * @param string $organization + * @param string $location + * @param string $standard + * + * @return string The formatted organization_location_standard resource. + */ + public static function organizationLocationStandardName(string $organization, string $location, string $standard): string + { + return self::getPathTemplate('organizationLocationStandard')->render([ + 'organization' => $organization, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_audit_report resource. + * + * @param string $project + * @param string $location + * @param string $auditReport + * + * @return string The formatted project_location_audit_report resource. + */ + public static function projectLocationAuditReportName(string $project, string $location, string $auditReport): string + { + return self::getPathTemplate('projectLocationAuditReport')->render([ + 'project' => $project, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_resource_enrollment_status resource. + * + * @param string $project + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted project_location_resource_enrollment_status resource. + */ + public static function projectLocationResourceEnrollmentStatusName(string $project, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('projectLocationResourceEnrollmentStatus')->render([ + 'project' => $project, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_standard resource. + * + * @param string $project + * @param string $location + * @param string $standard + * + * @return string The formatted project_location_standard resource. + */ + public static function projectLocationStandardName(string $project, string $location, string $standard): string + { + return self::getPathTemplate('projectLocationStandard')->render([ + 'project' => $project, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * resource_enrollment_status resource. + * + * @param string $folder + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted resource_enrollment_status resource. + */ + public static function resourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('resourceEnrollmentStatus')->render([ + 'folder' => $folder, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a standard + * resource. + * + * @param string $project + * @param string $location + * @param string $standard + * + * @return string The formatted standard resource. + */ + public static function standardName(string $project, string $location, string $standard): string + { + return self::getPathTemplate('standard')->render([ + 'project' => $project, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - auditReport: projects/{project}/locations/{location}/auditReports/{audit_report} + * - enrollmentStatusScope: folders/{folder}/locations/{location} + * - folderLocation: folders/{folder}/locations/{location} + * - folderLocationAuditReport: folders/{folder}/locations/{location}/auditReports/{audit_report} + * - folderLocationResourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - folderLocationStandard: folders/{folder}/locations/{location}/standards/{standard} + * - location: projects/{project}/locations/{location} + * - organizationLocation: organizations/{organization}/locations/{location} + * - organizationLocationResourceEnrollmentStatus: organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - organizationLocationStandard: organizations/{organization}/locations/{location}/standards/{standard} + * - projectLocationAuditReport: projects/{project}/locations/{location}/auditReports/{audit_report} + * - projectLocationResourceEnrollmentStatus: projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - projectLocationStandard: projects/{project}/locations/{location}/standards/{standard} + * - resourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - standard: projects/{project}/locations/{location}/standards/{standard} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'auditmanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\AuditManager\V1\AuditManagerClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new AuditManagerClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Enrolls the customer resource(folder/project/organization) to the audit + * manager service by creating the audit managers Service Agent in customers + * workload and granting required permissions to the Service Agent. Please + * note that if enrollment request is made on the already enrolled workload + * then enrollment is executed overriding the existing set of destinations. + * + * The async variant is {@see AuditManagerClient::enrollResourceAsync()} . + * + * @example samples/V1/AuditManagerClient/enroll_resource.php + * + * @param EnrollResourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Enrollment + * + * @throws ApiException Thrown if the API call fails. + */ + public function enrollResource(EnrollResourceRequest $request, array $callOptions = []): Enrollment + { + return $this->startApiCall('EnrollResource', $request, $callOptions)->wait(); + } + + /** + * Register the Audit Report generation requests and returns the OperationId + * using which the customer can track the report generation progress. + * + * The async variant is {@see AuditManagerClient::generateAuditReportAsync()} . + * + * @example samples/V1/AuditManagerClient/generate_audit_report.php + * + * @param GenerateAuditReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAuditReport(GenerateAuditReportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('GenerateAuditReport', $request, $callOptions)->wait(); + } + + /** + * Generates a demo report highlighting different responsibilities + * (Google/Customer/ shared) required to be fulfilled for the customer's + * workload to be compliant with the given standard. + * + * The async variant is {@see AuditManagerClient::generateAuditScopeReportAsync()} + * . + * + * @example samples/V1/AuditManagerClient/generate_audit_scope_report.php + * + * @param GenerateAuditScopeReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AuditScopeReport + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAuditScopeReport(GenerateAuditScopeReportRequest $request, array $callOptions = []): AuditScopeReport + { + return $this->startApiCall('GenerateAuditScopeReport', $request, $callOptions)->wait(); + } + + /** + * Get the overall audit report + * + * The async variant is {@see AuditManagerClient::getAuditReportAsync()} . + * + * @example samples/V1/AuditManagerClient/get_audit_report.php + * + * @param GetAuditReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AuditReport + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAuditReport(GetAuditReportRequest $request, array $callOptions = []): AuditReport + { + return $this->startApiCall('GetAuditReport', $request, $callOptions)->wait(); + } + + /** + * Get a resource along with its enrollment status. + * + * The async variant is + * {@see AuditManagerClient::getResourceEnrollmentStatusAsync()} . + * + * @example samples/V1/AuditManagerClient/get_resource_enrollment_status.php + * + * @param GetResourceEnrollmentStatusRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ResourceEnrollmentStatus + * + * @throws ApiException Thrown if the API call fails. + */ + public function getResourceEnrollmentStatus(GetResourceEnrollmentStatusRequest $request, array $callOptions = []): ResourceEnrollmentStatus + { + return $this->startApiCall('GetResourceEnrollmentStatus', $request, $callOptions)->wait(); + } + + /** + * Lists audit reports in the selected parent scope + * + * The async variant is {@see AuditManagerClient::listAuditReportsAsync()} . + * + * @example samples/V1/AuditManagerClient/list_audit_reports.php + * + * @param ListAuditReportsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAuditReports(ListAuditReportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAuditReports', $request, $callOptions); + } + + /** + * Gets controls needed to be implemented to be compliant to a standard. + * + * The async variant is {@see AuditManagerClient::listControlsAsync()} . + * + * @example samples/V1/AuditManagerClient/list_controls.php + * + * @param ListControlsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listControls(ListControlsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListControls', $request, $callOptions); + } + + /** + * Fetches all resources under the parent along with their enrollment. + * + * The async variant is + * {@see AuditManagerClient::listResourceEnrollmentStatusesAsync()} . + * + * @example samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php + * + * @param ListResourceEnrollmentStatusesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listResourceEnrollmentStatuses(ListResourceEnrollmentStatusesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListResourceEnrollmentStatuses', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AuditManagerClient::getLocationAsync()} . + * + * @example samples/V1/AuditManagerClient/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. + This method can be called in two ways: + + * **List all public locations:** Use the path `GET /v1/locations`. + * **List project-visible locations:** Use the path + `GET /v1/projects/{project_id}/locations`. This may include public + locations as well as private or other locations specifically visible + to the project. + * + * The async variant is {@see AuditManagerClient::listLocationsAsync()} . + * + * @example samples/V1/AuditManagerClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json b/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..cefc1825f767 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.auditmanager.v1", + "libraryPackage": "Google\\Cloud\\AuditManager\\V1", + "services": { + "AuditManager": { + "clients": { + "grpc": { + "libraryClient": "AuditManagerGapicClient", + "rpcs": { + "EnrollResource": { + "methods": [ + "enrollResource" + ] + }, + "GenerateAuditReport": { + "methods": [ + "generateAuditReport" + ] + }, + "GenerateAuditScopeReport": { + "methods": [ + "generateAuditScopeReport" + ] + }, + "GetAuditReport": { + "methods": [ + "getAuditReport" + ] + }, + "GetResourceEnrollmentStatus": { + "methods": [ + "getResourceEnrollmentStatus" + ] + }, + "ListAuditReports": { + "methods": [ + "listAuditReports" + ] + }, + "ListControls": { + "methods": [ + "listControls" + ] + }, + "ListResourceEnrollmentStatuses": { + "methods": [ + "listResourceEnrollmentStatuses" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json new file mode 100644 index 000000000000..621862801f8f --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.cloud.auditmanager.v1.AuditManager": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "EnrollResource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateAuditReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateAuditScopeReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAuditReport": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetResourceEnrollmentStatus": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAuditReports": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListControls": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListResourceEnrollmentStatuses": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php new file mode 100644 index 000000000000..f769ad7d7c3f --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php @@ -0,0 +1,206 @@ + [ + 'google.cloud.auditmanager.v1.AuditManager' => [ + 'GenerateAuditReport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AuditManager\V1\AuditReport', + 'metadataReturnType' => '\Google\Cloud\AuditManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'scope', + 'fieldAccessors' => [ + 'getScope', + ], + ], + ], + ], + 'EnrollResource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\Enrollment', + 'headerParams' => [ + [ + 'keyName' => 'scope', + 'fieldAccessors' => [ + 'getScope', + ], + ], + ], + ], + 'GenerateAuditScopeReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\AuditScopeReport', + 'headerParams' => [ + [ + 'keyName' => 'scope', + 'fieldAccessors' => [ + 'getScope', + ], + ], + ], + ], + 'GetAuditReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\AuditReport', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetResourceEnrollmentStatus' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAuditReports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAuditReports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ListAuditReportsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListControls' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getControls', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ListControlsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListResourceEnrollmentStatuses' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResourceEnrollmentStatuses', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'auditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', + 'enrollmentStatusScope' => 'folders/{folder}/locations/{location}', + 'folderLocation' => 'folders/{folder}/locations/{location}', + 'folderLocationAuditReport' => 'folders/{folder}/locations/{location}/auditReports/{audit_report}', + 'folderLocationResourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'folderLocationStandard' => 'folders/{folder}/locations/{location}/standards/{standard}', + 'location' => 'projects/{project}/locations/{location}', + 'organizationLocation' => 'organizations/{organization}/locations/{location}', + 'organizationLocationResourceEnrollmentStatus' => 'organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'organizationLocationStandard' => 'organizations/{organization}/locations/{location}/standards/{standard}', + 'projectLocationAuditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', + 'projectLocationResourceEnrollmentStatus' => 'projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'projectLocationStandard' => 'projects/{project}/locations/{location}/standards/{standard}', + 'resourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'standard' => 'projects/{project}/locations/{location}/standards/{standard}', + ], + ], + ], +]; diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php new file mode 100644 index 000000000000..d8a89311d794 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php @@ -0,0 +1,284 @@ + [ + 'google.cloud.auditmanager.v1.AuditManager' => [ + 'EnrollResource' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=folders/*/locations/*}:enrollResource', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=projects/*/locations/*}:enrollResource', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}:enrollResource', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'scope' => [ + 'getters' => [ + 'getScope', + ], + ], + ], + ], + 'GenerateAuditReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditReports:generate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditReports:generate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'scope' => [ + 'getters' => [ + 'getScope', + ], + ], + ], + ], + 'GenerateAuditScopeReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditScopeReports:generate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditScopeReports:generate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'scope' => [ + 'getters' => [ + 'getScope', + ], + ], + ], + ], + 'GetAuditReport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/auditReports/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/auditReports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetResourceEnrollmentStatus' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAuditReports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/auditReports', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/auditReports', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/auditReports', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListControls' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*/standards/*}/controls', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*/standards/*}/controls', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/standards/*}/controls', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListResourceEnrollmentStatuses' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatuses', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php b/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php new file mode 100644 index 000000000000..d7b08ea65d24 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php @@ -0,0 +1,906 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AuditManagerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AuditManagerClient($options); + } + + /** @test */ + public function enrollResourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Enrollment(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $scope = 'scope109264468'; + $destinations = []; + $request = (new EnrollResourceRequest()) + ->setScope($scope) + ->setDestinations($destinations); + $response = $gapicClient->enrollResource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getDestinations(); + $this->assertProtobufEquals($destinations, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enrollResourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $scope = 'scope109264468'; + $destinations = []; + $request = (new EnrollResourceRequest()) + ->setScope($scope) + ->setDestinations($destinations); + try { + $gapicClient->enrollResource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAuditReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/generateAuditReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $operationId = 'operationId-274116877'; + $complianceStandard2 = 'complianceStandard2-1079015980'; + $scope2 = 'scope21923941639'; + $complianceFramework2 = 'complianceFramework2-1333971955'; + $scopeId = 'scopeId-487349530'; + $expectedResponse = new AuditReport(); + $expectedResponse->setName($name); + $expectedResponse->setOperationId($operationId); + $expectedResponse->setComplianceStandard($complianceStandard2); + $expectedResponse->setScope($scope2); + $expectedResponse->setComplianceFramework($complianceFramework2); + $expectedResponse->setScopeId($scopeId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/generateAuditReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $scope = 'scope109264468'; + $complianceStandard = 'complianceStandard1339657825'; + $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditReportRequest()) + ->setScope($scope) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + $response = $gapicClient->generateAuditReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualApiRequestObject->getComplianceStandard(); + $this->assertProtobufEquals($complianceStandard, $actualValue); + $actualValue = $actualApiRequestObject->getReportFormat(); + $this->assertProtobufEquals($reportFormat, $actualValue); + $actualValue = $actualApiRequestObject->getComplianceFramework(); + $this->assertProtobufEquals($complianceFramework, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAuditReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/generateAuditReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $scope = 'scope109264468'; + $complianceStandard = 'complianceStandard1339657825'; + $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditReportRequest()) + ->setScope($scope) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + $response = $gapicClient->generateAuditReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAuditScopeReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $scopeReportContents = '-38'; + $name = 'name3373707'; + $expectedResponse = new AuditScopeReport(); + $expectedResponse->setScopeReportContents($scopeReportContents); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $scope = 'scope109264468'; + $complianceStandard = 'complianceStandard1339657825'; + $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditScopeReportRequest()) + ->setScope($scope) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + $response = $gapicClient->generateAuditScopeReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditScopeReport', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getComplianceStandard(); + $this->assertProtobufEquals($complianceStandard, $actualValue); + $actualValue = $actualRequestObject->getReportFormat(); + $this->assertProtobufEquals($reportFormat, $actualValue); + $actualValue = $actualRequestObject->getComplianceFramework(); + $this->assertProtobufEquals($complianceFramework, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAuditScopeReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $scope = 'scope109264468'; + $complianceStandard = 'complianceStandard1339657825'; + $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditScopeReportRequest()) + ->setScope($scope) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + try { + $gapicClient->generateAuditScopeReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuditReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $operationId = 'operationId-274116877'; + $complianceStandard = 'complianceStandard1339657825'; + $scope = 'scope109264468'; + $complianceFramework = 'complianceFramework1384085210'; + $scopeId = 'scopeId-487349530'; + $expectedResponse = new AuditReport(); + $expectedResponse->setName($name2); + $expectedResponse->setOperationId($operationId); + $expectedResponse->setComplianceStandard($complianceStandard); + $expectedResponse->setScope($scope); + $expectedResponse->setComplianceFramework($complianceFramework); + $expectedResponse->setScopeId($scopeId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); + $request = (new GetAuditReportRequest()) + ->setName($formattedName); + $response = $gapicClient->getAuditReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetAuditReport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuditReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); + $request = (new GetAuditReportRequest()) + ->setName($formattedName); + try { + $gapicClient->getAuditReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getResourceEnrollmentStatusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $enrolled = false; + $displayName = 'displayName1615086568'; + $expectedResponse = new ResourceEnrollmentStatus(); + $expectedResponse->setName($name2); + $expectedResponse->setEnrolled($enrolled); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); + $request = (new GetResourceEnrollmentStatusRequest()) + ->setName($formattedName); + $response = $gapicClient->getResourceEnrollmentStatus($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetResourceEnrollmentStatus', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getResourceEnrollmentStatusExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); + $request = (new GetResourceEnrollmentStatusRequest()) + ->setName($formattedName); + try { + $gapicClient->getResourceEnrollmentStatus($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuditReportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $auditReportsElement = new AuditReport(); + $auditReports = [ + $auditReportsElement, + ]; + $expectedResponse = new ListAuditReportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuditReports($auditReports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); + $request = (new ListAuditReportsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAuditReports($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuditReports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListAuditReports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuditReportsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); + $request = (new ListAuditReportsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAuditReports($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listControlsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $controlsElement = new Control(); + $controls = [ + $controlsElement, + ]; + $expectedResponse = new ListControlsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setControls($controls); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); + $request = (new ListControlsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listControls($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getControls()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListControls', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listControlsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); + $request = (new ListControlsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listControls($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listResourceEnrollmentStatusesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourceEnrollmentStatusesElement = new ResourceEnrollmentStatus(); + $resourceEnrollmentStatuses = [ + $resourceEnrollmentStatusesElement, + ]; + $expectedResponse = new ListResourceEnrollmentStatusesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResourceEnrollmentStatuses($resourceEnrollmentStatuses); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); + $request = (new ListResourceEnrollmentStatusesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listResourceEnrollmentStatuses($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResourceEnrollmentStatuses()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListResourceEnrollmentStatuses', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listResourceEnrollmentStatusesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); + $request = (new ListResourceEnrollmentStatusesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listResourceEnrollmentStatuses($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 enrollResourceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Enrollment(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $scope = 'scope109264468'; + $destinations = []; + $request = (new EnrollResourceRequest()) + ->setScope($scope) + ->setDestinations($destinations); + $response = $gapicClient->enrollResourceAsync($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.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getDestinations(); + $this->assertProtobufEquals($destinations, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From 166ee010ec581547d2c212305272a776c474416f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 2 Mar 2026 10:14:19 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- AuditManager/metadata/V1/Auditmanager.php | Bin 11278 -> 11274 bytes .../Cloud/Auditmanager/V1/Auditmanager.php | Bin 11274 -> 0 bytes .../Cloud/AuditManager/V1/AuditReport.php | 445 --------- .../V1/AuditReport/ReportGenerationState.php | 82 -- .../AuditManager/V1/AuditScopeReport.php | 113 --- .../Cloud/AuditManager/V1/ComplianceState.php | 82 -- .../Google/Cloud/AuditManager/V1/Control.php | 407 -------- .../Cloud/AuditManager/V1/Control/Family.php | 176 ---- .../Cloud/AuditManager/V1/ControlDetails.php | 155 --- .../Cloud/AuditManager/V1/ControlFamily.php | 101 -- .../AuditManager/V1/DestinationDetails.php | 75 -- .../AuditManager/V1/EnrollResourceRequest.php | 166 ---- .../EligibleDestination.php | 81 -- .../Cloud/AuditManager/V1/Enrollment.php | 105 -- .../V1/GenerateAuditReportRequest.php | 259 ----- .../AuditReportFormat.php | 57 -- .../V1/GenerateAuditScopeReportRequest.php | 211 ---- .../AuditScopeReportFormat.php | 57 -- .../AuditManager/V1/GetAuditReportRequest.php | 91 -- .../V1/GetResourceEnrollmentStatusRequest.php | 96 -- .../V1/ListAuditReportsRequest.php | 153 --- .../V1/ListAuditReportsResponse.php | 101 -- .../AuditManager/V1/ListControlsRequest.php | 163 ---- .../AuditManager/V1/ListControlsResponse.php | 101 -- .../ListResourceEnrollmentStatusesRequest.php | 159 --- ...ListResourceEnrollmentStatusesResponse.php | 101 -- .../AuditManager/V1/OperationMetadata.php | 307 ------ .../Cloud/AuditManager/V1/OperationState.php | 105 -- .../V1/ReportGenerationProgress.php | 321 ------- .../Cloud/AuditManager/V1/ReportSummary.php | 203 ---- .../V1/ResourceEnrollmentStatus.php | 224 ----- .../ResourceEnrollmentState.php | 71 -- .../V1/AuditManagerClient/enroll_resource.php | 81 -- .../generate_audit_report.php | 101 -- .../generate_audit_scope_report.php | 96 -- .../AuditManagerClient/get_audit_report.php | 73 -- .../V1/AuditManagerClient/get_location.php | 57 -- .../get_resource_enrollment_status.php | 78 -- .../AuditManagerClient/list_audit_reports.php | 76 -- .../V1/AuditManagerClient/list_controls.php | 78 -- .../V1/AuditManagerClient/list_locations.php | 69 -- .../list_resource_enrollment_statuses.php | 77 -- .../v1/src/V1/Client/AuditManagerClient.php | 855 ----------------- .../v1/src/V1/gapic_metadata.json | 68 -- .../audit_manager_client_config.json | 94 -- .../audit_manager_descriptor_config.php | 206 ---- .../audit_manager_rest_client_config.php | 284 ------ .../Unit/V1/Client/AuditManagerClientTest.php | 906 ------------------ 48 files changed, 7967 deletions(-) delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php delete mode 100644 owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php diff --git a/AuditManager/metadata/V1/Auditmanager.php b/AuditManager/metadata/V1/Auditmanager.php index a86ea1bbecd9308de38e1f18753cea0b6bd17ea0..d3a021b12e854079db640b491000d50be468aadf 100644 GIT binary patch delta 111 zcmeB+=!)3j%FOa5fJ=X(xBlh|W<6E*No-sS$@#gH3k78-pVAO;bxF?2FHO-)&(BZK tN!0_&=%?rFCzhsUmgFYpC8nnq=_eLsmKmZ56(m_Bt0+j?tgQK(2>^R{C}{uy delta 97 zcmeB*=!@9k%FOa3fJ=X(xBlh|W<6E*X>42y$@#gH3k78-pVAOe^GMInPtQr!OV7_q x%uCnHFG|->Pt7YR$}h>+he#zBWEM{h6yvo{EKSKQ$xX~lOiwM^EU)>R2>@+$BD??q diff --git a/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php b/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php deleted file mode 100644 index d3a021b12e854079db640b491000d50be468aadf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11274 zcmbtaPiz}m8Q-y+H2u=1?n~Qb)9%)t{!6o6yK#5RuG?&P;y9_hj%_(fS5!fxi9Jb& zbv$Nf+)}EDKLVr`LMyQn9FVwxIP3u-4l7OwAp~fJ5CXJ^Js=Q!Ks|v3m)#5B`!nNb z#~#}ymx*WI_r34^-uM5#o3|SG8*nbZV%AN^@XTs_>rvdhZ^j#r?b#K(7T;=aZ<|iM zV(&Jrn&~9s@ugzCP+X5^mvZZ8k<_)DPQ^^ecWis7W+p2&yID;d&8p??8g*mGbdnF| z+kPh)Z-Bb7Yq|}iV#ZfWi>sz*R1MGATw!cBGnCDyCb8MPJAVV9QZrmPF29Gz5XZkp zbE{@m;;v_S_&9I5x>dJ4%cxmj!c{HAw~d->B7^;7x105fXW8{QB`DS_=IrG-=Sjz& zZ`g>!LfjXuM1et2Hgk2)bm~TJbIEioj@9sNr-Vb(=^fJx;G}P6FNo!HfuDj`UYfUW{y$CZk%dC6D z(JWhLt-5I5Hy&8FGaPBz6sj|@ka@el<237atG=^YY*2+AZjr&>ty`#ip0V5LE-~Bl z7hki)4r|qFu%XLn1hc^w&<(i+|0zLoNbM)5IYEM%OF}l6#Dn>nDZ$QYSZGjmSGdv4 zoRL0kQ|R?AfxQ^;tTez80E+C%UpvWNX%r zwN*3G+7jzNu6ZPGSG$Ss9p7{;Z*s29E=7WaTptY+je#hZ~6dIPo&nv z(dZ*fqEp6Y#+%Q07LH3YZ9C|3AKK1a(<6b{>NcG0&VgKp3)%)cd3`NYEM@g_wp1*y z>&wORsEY=^q) zQ-6@RyMugZ2$0((6MyQG_WD0=2_w2XKddu1r z^+yU^>?ft$z#wUo%}qG%J4@YU&W$2SjTj*`U6h`>t?S`B)C(_i8jjY@FM7HpXW%!Y z>bDe_qH;>A65w~M1HUB0?=soE6b7KgX?WPa4Ac9i5jbVx2%A@Tm>ctPxg3s*Bo5uO zXdgW8!U@!8iO5&sg*FuyP{6=Ys9#rLk}fS{*FB710mwHyK)%92z6j^pT167uX&h)> z%)bv0umi{2r4ZoWgt3Z{Oz7K%a9qVY2Ep|25t!y)NVs6kn=l#LL8W)e>ln9D(YbG! zNL>k^HORZDe=+&wr(j~+uxd@mM9nZnYPM0uY;gb3SvK?>oRnOpoCc(5kl_Mm;jpaL z)7RK1)UW6#+T|hi>+L8&%Xg7uZR(1OKSs(hDT`CZn#ZcS=(MPJxf+i9QY-CQ;&e>< z^t+KK+B*@r7^bX}RIg)V_j$A8xyi@kzrAG5uJH6M`Plz=FWGW~IJEU+kG!^R*Q%z2 zZ}~sN(%-S29iwi2$)8gGIV7*S@s?n23R*wZKSUtLT!@sskuz|@rMaANU#Nqa;MYCs z#+2E^x1R~NEbz`_>HjKEw0|pbB@Etu6BPypnQ@gwL{Ql)U6yl?S!`l?WUQOy4io$xAR^L5ufHot6m<$MMvRugHi3E0q&Lxy21`9>&aim6K4Y z2Oyb*QO|I&vTjBADBZ3HrnAM;Xkp9fiFnY~vA}aNUudPeQB1u~I=ogft9pf|>9rcu z!s$_zVvGwn4da*r>B!hcA2fZCIRhHD)E|#hC)z#D3REYkea46el14I*IG&pIvFTd( ziOPrO9$c6yiWIH2OkPNgEsjhpG=x5jb(Q5dYQ`g-rFFED5D@G_tYru+h2bDfqzd7a z_gY(``v>m(RTrjue5VCOIlETeC}*;IwooqS^Q+kcmJ{pRdbXp0h{0j(DTz^7QYhpI z9Lg1LXUn;D{23vKVT`lDU(xjUqffN&MV~HxC7&D2nw%b6ZK9F--}Wbqdqf}9_rDP@Aa8V=CH z;slKG=!Tm$9=uk+ihZT7jIr2(bD~&Y$riF@Z9P{kboC-fVLVsROXcDU`kgiIL^8$I zQa;O_2*BvFmdjHYLMGwp+Q#atR{kuyqBjb~Hw&=?=|5t$|GhGJ&POtX8aoTHe0@QX z=Nqy|w80!w2#YzM!3zGVacQXf3LFs%v25&GwMS@&)LdA+BF8(z2}^*~PY=LB zK}wE7#2+2lU0VbSa;7K-zEM5_3)X!r3Nb~3i^sX6f2iPS_-4fuWFVaIqIf$28QixdT#vs-Wug?LP@*SzFEJsou*y zyitf~8MGPtT*rt@pBrc>_{?ar1MImP8)45cwz3o(VeClGA-z`gma+v* zRrkjld4lKB0Fy(|vI)C2%PcDT@lFE9Dn(}CWak$V)o#wA)*tQI zV@z32vmlt$=<2#<-OP?A-xu%YDq@gS!CGcTDa1-j~4B~nSo0w z^*72#8euud6?EMG;gS2bKY#pg$IEcOId^i)~D2cT)XhsA)plRR z`l45aC*dbu4C-$v>P>0w-J#|;1*C~wJWuC$6DaJ9>Vm|g2khZI$ZsPs*@gypVC0o> z1iFy;*gfY{N=K`SzzM1!Dj#U^j*=+&>i1GU(vloZaSV24Fi;<>pOF9w!<4VG9nJ;y z6^S|&&MxHSXV_)yJS-qD`(Si$adeLNG3;}=vY(8%&DEcv9*RRIre!}+$jfX^{NQOJ z%*42&h?U)&CrO!b04(pN2zMT0u0a4KA7dKOe!$Vs|Fw_y0UP|(MRh*X*y$ew$P~+@ zeWULFt__yt++MIuM$&zeoiyZM5jcf{`#!U?$w6KZSCbG@AAmj@(`#llM;VUaDdaV_ z?O}^^diR15o?C=Fr4U5J8DvSOB|?b8CPUefUq|41YA3x`Zn`8Bj(Rw?5B$>q$3z(J zcRLLCn~FeT5X0>aM6erzO%F5f&4BzO0*5IOB3F0GeE;?OV||EH!;lC-XqqB>viB9C zSN#D=Vkd`%T^G$YDUx~j-m8QMhcGC5kfsTb41%YCiH9Hm zq7mL_*s-~j5>h2`%8r|fjjbE9+>NdGBBxi_eZ)kD-bYNxiEQHT{0IK$O>tk5Usx2G z?k3(?d=fds8Kl#ULpm+9NT+dxwgz+Ztet=?v*WhBIHMyMe1#4@etV*sa5ao;QR*QF zyyx3}&tv&#_oKNd+CP;656W)_I@IUnv87ax{eSmJdZ1-X$}G|1wVh!b=KjRktMmWe zd!l_?d77ImgY6g@9{jCQgw(UIT?+0aUf~x=rTeBRJ>G}ya@UlNgoogle.cloud.auditmanager.v1.AuditReport - */ -class AuditReport extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Report summary with compliance, violation counts etc. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $report_summary = null; - /** - * Output only. ClientOperationId - * - * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $operation_id = ''; - /** - * Output only. The location where the generated report will be uploaded. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $destination_details = null; - /** - * Output only. Compliance Standard. - * - * Generated from protobuf field string compliance_standard = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compliance_standard = ''; - /** - * Output only. The parent scope on which the report was generated. - * - * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scope = ''; - /** - * Output only. Creation time of the audit report. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The overall status of controls - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $control_details; - /** - * Output only. The state of Audit Report Generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $report_generation_state = 0; - /** - * Output only. Compliance Framework of Audit Report - * - * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compliance_framework = ''; - /** - * Output only. The ID/ Number for the scope on which the audit report was - * generated. - * - * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scope_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of this Audit Report, in the format of scope given in - * request. - * @type \Google\Cloud\AuditManager\V1\ReportSummary $report_summary - * Output only. Report summary with compliance, violation counts etc. - * @type string $operation_id - * Output only. ClientOperationId - * @type \Google\Cloud\AuditManager\V1\DestinationDetails $destination_details - * Output only. The location where the generated report will be uploaded. - * @type string $compliance_standard - * Output only. Compliance Standard. - * @type string $scope - * Output only. The parent scope on which the report was generated. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of the audit report. - * @type array<\Google\Cloud\AuditManager\V1\ControlDetails>|\Google\Protobuf\Internal\RepeatedField $control_details - * Output only. The overall status of controls - * @type int $report_generation_state - * Output only. The state of Audit Report Generation. - * @type string $compliance_framework - * Output only. Compliance Framework of Audit Report - * @type string $scope_id - * Output only. The ID/ Number for the scope on which the audit report was - * generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. - * - * 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 Audit Report, in the format of scope given in - * request. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Report summary with compliance, violation counts etc. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\ReportSummary|null - */ - public function getReportSummary() - { - return $this->report_summary; - } - - public function hasReportSummary() - { - return isset($this->report_summary); - } - - public function clearReportSummary() - { - unset($this->report_summary); - } - - /** - * Output only. Report summary with compliance, violation counts etc. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\ReportSummary $var - * @return $this - */ - public function setReportSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); - $this->report_summary = $var; - - return $this; - } - - /** - * Output only. ClientOperationId - * - * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOperationId() - { - return $this->operation_id; - } - - /** - * Output only. ClientOperationId - * - * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOperationId($var) - { - GPBUtil::checkString($var, True); - $this->operation_id = $var; - - return $this; - } - - /** - * Output only. The location where the generated report will be uploaded. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\DestinationDetails|null - */ - public function getDestinationDetails() - { - return $this->destination_details; - } - - public function hasDestinationDetails() - { - return isset($this->destination_details); - } - - public function clearDestinationDetails() - { - unset($this->destination_details); - } - - /** - * Output only. The location where the generated report will be uploaded. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\DestinationDetails $var - * @return $this - */ - public function setDestinationDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\DestinationDetails::class); - $this->destination_details = $var; - - return $this; - } - - /** - * Output only. Compliance Standard. - * - * Generated from protobuf field string compliance_standard = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getComplianceStandard() - { - return $this->compliance_standard; - } - - /** - * Output only. Compliance Standard. - * - * Generated from protobuf field string compliance_standard = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setComplianceStandard($var) - { - GPBUtil::checkString($var, True); - $this->compliance_standard = $var; - - return $this; - } - - /** - * Output only. The parent scope on which the report was generated. - * - * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Output only. The parent scope on which the report was generated. - * - * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Output only. Creation time of the audit report. - * - * 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. Creation time of the audit report. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The overall status of controls - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getControlDetails() - { - return $this->control_details; - } - - /** - * Output only. The overall status of controls - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\AuditManager\V1\ControlDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setControlDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ControlDetails::class); - $this->control_details = $arr; - - return $this; - } - - /** - * Output only. The state of Audit Report Generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getReportGenerationState() - { - return $this->report_generation_state; - } - - /** - * Output only. The state of Audit Report Generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setReportGenerationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\AuditReport\ReportGenerationState::class); - $this->report_generation_state = $var; - - return $this; - } - - /** - * Output only. Compliance Framework of Audit Report - * - * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getComplianceFramework() - { - return $this->compliance_framework; - } - - /** - * Output only. Compliance Framework of Audit Report - * - * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setComplianceFramework($var) - { - GPBUtil::checkString($var, True); - $this->compliance_framework = $var; - - return $this; - } - - /** - * Output only. The ID/ Number for the scope on which the audit report was - * generated. - * - * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getScopeId() - { - return $this->scope_id; - } - - /** - * Output only. The ID/ Number for the scope on which the audit report was - * generated. - * - * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setScopeId($var) - { - GPBUtil::checkString($var, True); - $this->scope_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php deleted file mode 100644 index c4d761454990..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.auditmanager.v1.AuditReport.ReportGenerationState - */ -class ReportGenerationState -{ - /** - * Unspecified. Invalid state. - * - * Generated from protobuf enum REPORT_GENERATION_STATE_UNSPECIFIED = 0; - */ - const REPORT_GENERATION_STATE_UNSPECIFIED = 0; - /** - * Audit report generation process is in progress, ie. operation state is - * neither OPERATION_STATE_DONE nor OPERATION_STATE_FAILED. - * - * Generated from protobuf enum IN_PROGRESS = 1; - */ - const IN_PROGRESS = 1; - /** - * Audit report generation process is completed. Operation state is - * OPERATION_STATE_DONE. - * - * Generated from protobuf enum COMPLETED = 2; - */ - const COMPLETED = 2; - /** - * Audit report generation process has failed. Operation state is - * OPERATION_STATE_FAILED. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * Audit report generation process has completed. But report summary is - * unknown. This is valid for older reports. - * - * Generated from protobuf enum SUMMARY_UNKNOWN = 4; - */ - const SUMMARY_UNKNOWN = 4; - - private static $valueToName = [ - self::REPORT_GENERATION_STATE_UNSPECIFIED => 'REPORT_GENERATION_STATE_UNSPECIFIED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::COMPLETED => 'COMPLETED', - self::FAILED => 'FAILED', - self::SUMMARY_UNKNOWN => 'SUMMARY_UNKNOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReportGenerationState::class, \Google\Cloud\AuditManager\V1\AuditReport_ReportGenerationState::class); - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php deleted file mode 100644 index 5c56618fa228..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.auditmanager.v1.AuditScopeReport - */ -class AuditScopeReport extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - protected $audit_report; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope_report_contents - * The audit scope report content in byte format. - * @type string $name - * Identifier. The name of this Audit Report, in the format of scope given in - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * The audit scope report content in byte format. - * - * Generated from protobuf field bytes scope_report_contents = 1; - * @return string - */ - public function getScopeReportContents() - { - return $this->readOneof(1); - } - - public function hasScopeReportContents() - { - return $this->hasOneof(1); - } - - /** - * The audit scope report content in byte format. - * - * Generated from protobuf field bytes scope_report_contents = 1; - * @param string $var - * @return $this - */ - public function setScopeReportContents($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * @return string - */ - public function getAuditReport() - { - return $this->whichOneof("audit_report"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php deleted file mode 100644 index d8dcc8141bf7..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.auditmanager.v1.ComplianceState - */ -class ComplianceState -{ - /** - * Unspecified. Invalid state. - * - * Generated from protobuf enum COMPLIANCE_STATE_UNSPECIFIED = 0; - */ - const COMPLIANCE_STATE_UNSPECIFIED = 0; - /** - * Compliant. - * - * Generated from protobuf enum COMPLIANT = 1; - */ - const COMPLIANT = 1; - /** - * Violation. - * - * Generated from protobuf enum VIOLATION = 2; - */ - const VIOLATION = 2; - /** - * MANUAL_REVIEW_NEEDED, requires manual review - * - * Generated from protobuf enum MANUAL_REVIEW_NEEDED = 3; - */ - const MANUAL_REVIEW_NEEDED = 3; - /** - * Error while computing status. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - /** - * Cannot be audited - * - * Generated from protobuf enum AUDIT_NOT_SUPPORTED = 5; - */ - const AUDIT_NOT_SUPPORTED = 5; - - private static $valueToName = [ - self::COMPLIANCE_STATE_UNSPECIFIED => 'COMPLIANCE_STATE_UNSPECIFIED', - self::COMPLIANT => 'COMPLIANT', - self::VIOLATION => 'VIOLATION', - self::MANUAL_REVIEW_NEEDED => 'MANUAL_REVIEW_NEEDED', - self::ERROR => 'ERROR', - self::AUDIT_NOT_SUPPORTED => 'AUDIT_NOT_SUPPORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php deleted file mode 100644 index cb413048b6f8..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php +++ /dev/null @@ -1,407 +0,0 @@ -google.cloud.auditmanager.v1.Control - */ -class Control extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The control identifier used to fetch the findings. This is - * same as the control report name. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = ''; - /** - * Output only. Display name of the control. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. Group where the control belongs. E.g. Access Control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $family = 0; - /** - * Output only. Regulatory Family of the control E.g. Access Control - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $control_family = null; - /** - * Output only. Regulatory control ask of the control - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. The type of responsibility for implementing this control. It - * can be google, customer or shared. - * - * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $responsibility_type = ''; - /** - * Output only. Description of the google responsibility for implementing this - * control. - * - * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_responsibility_description = ''; - /** - * Output only. Implementation of the google responsibility for implementing - * this control. - * - * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_responsibility_implementation = ''; - /** - * Output only. Description of the customer responsibility for implementing - * this control. - * - * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $customer_responsibility_description = ''; - /** - * Output only. Implementation of the customer responsibility for implementing - * this control. - * - * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $customer_responsibility_implementation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Output only. The control identifier used to fetch the findings. This is - * same as the control report name. - * @type string $display_name - * Output only. Display name of the control. - * @type int $family - * Output only. Group where the control belongs. E.g. Access Control. - * @type \Google\Cloud\AuditManager\V1\ControlFamily $control_family - * Output only. Regulatory Family of the control E.g. Access Control - * @type string $description - * Output only. Regulatory control ask of the control - * @type string $responsibility_type - * Output only. The type of responsibility for implementing this control. It - * can be google, customer or shared. - * @type string $google_responsibility_description - * Output only. Description of the google responsibility for implementing this - * control. - * @type string $google_responsibility_implementation - * Output only. Implementation of the google responsibility for implementing - * this control. - * @type string $customer_responsibility_description - * Output only. Description of the customer responsibility for implementing - * this control. - * @type string $customer_responsibility_implementation - * Output only. Implementation of the customer responsibility for implementing - * this control. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The control identifier used to fetch the findings. This is - * same as the control report name. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. The control identifier used to fetch the findings. This is - * same as the control report name. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Output only. Display name of the control. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. Display name of the control. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Group where the control belongs. E.g. Access Control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFamily() - { - return $this->family; - } - - /** - * Output only. Group where the control belongs. E.g. Access Control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFamily($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\Control\Family::class); - $this->family = $var; - - return $this; - } - - /** - * Output only. Regulatory Family of the control E.g. Access Control - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\ControlFamily|null - */ - public function getControlFamily() - { - return $this->control_family; - } - - public function hasControlFamily() - { - return isset($this->control_family); - } - - public function clearControlFamily() - { - unset($this->control_family); - } - - /** - * Output only. Regulatory Family of the control E.g. Access Control - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\ControlFamily $var - * @return $this - */ - public function setControlFamily($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ControlFamily::class); - $this->control_family = $var; - - return $this; - } - - /** - * Output only. Regulatory control ask of the control - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Regulatory control ask of the control - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The type of responsibility for implementing this control. It - * can be google, customer or shared. - * - * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getResponsibilityType() - { - return $this->responsibility_type; - } - - /** - * Output only. The type of responsibility for implementing this control. It - * can be google, customer or shared. - * - * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setResponsibilityType($var) - { - GPBUtil::checkString($var, True); - $this->responsibility_type = $var; - - return $this; - } - - /** - * Output only. Description of the google responsibility for implementing this - * control. - * - * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGoogleResponsibilityDescription() - { - return $this->google_responsibility_description; - } - - /** - * Output only. Description of the google responsibility for implementing this - * control. - * - * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGoogleResponsibilityDescription($var) - { - GPBUtil::checkString($var, True); - $this->google_responsibility_description = $var; - - return $this; - } - - /** - * Output only. Implementation of the google responsibility for implementing - * this control. - * - * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGoogleResponsibilityImplementation() - { - return $this->google_responsibility_implementation; - } - - /** - * Output only. Implementation of the google responsibility for implementing - * this control. - * - * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGoogleResponsibilityImplementation($var) - { - GPBUtil::checkString($var, True); - $this->google_responsibility_implementation = $var; - - return $this; - } - - /** - * Output only. Description of the customer responsibility for implementing - * this control. - * - * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCustomerResponsibilityDescription() - { - return $this->customer_responsibility_description; - } - - /** - * Output only. Description of the customer responsibility for implementing - * this control. - * - * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCustomerResponsibilityDescription($var) - { - GPBUtil::checkString($var, True); - $this->customer_responsibility_description = $var; - - return $this; - } - - /** - * Output only. Implementation of the customer responsibility for implementing - * this control. - * - * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCustomerResponsibilityImplementation() - { - return $this->customer_responsibility_implementation; - } - - /** - * Output only. Implementation of the customer responsibility for implementing - * this control. - * - * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCustomerResponsibilityImplementation($var) - { - GPBUtil::checkString($var, True); - $this->customer_responsibility_implementation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php deleted file mode 100644 index 2886d52f8770..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.auditmanager.v1.Control.Family - */ -class Family -{ - /** - * Unspecified. Invalid state. - * - * Generated from protobuf enum FAMILY_UNSPECIFIED = 0; - */ - const FAMILY_UNSPECIFIED = 0; - /** - * Access Control - * - * Generated from protobuf enum AC = 1; - */ - const AC = 1; - /** - * Awareness and Training - * - * Generated from protobuf enum AT = 2; - */ - const AT = 2; - /** - * Audit and Accountability - * - * Generated from protobuf enum AU = 3; - */ - const AU = 3; - /** - * Certification, Accreditation and Security Assessments - * - * Generated from protobuf enum CA = 4; - */ - const CA = 4; - /** - * Configuration Management - * - * Generated from protobuf enum CM = 5; - */ - const CM = 5; - /** - * Contingency Planning - * - * Generated from protobuf enum CP = 6; - */ - const CP = 6; - /** - * Identification and Authentication - * - * Generated from protobuf enum IA = 7; - */ - const IA = 7; - /** - * Incident Response - * - * Generated from protobuf enum IR = 8; - */ - const IR = 8; - /** - * Maintenance - * - * Generated from protobuf enum MA = 9; - */ - const MA = 9; - /** - * Media Protection - * - * Generated from protobuf enum MP = 10; - */ - const MP = 10; - /** - * Physical and Environmental Protection - * - * Generated from protobuf enum PE = 11; - */ - const PE = 11; - /** - * Security Planning - * - * Generated from protobuf enum PL = 12; - */ - const PL = 12; - /** - * Personnel Security - * - * Generated from protobuf enum PS = 13; - */ - const PS = 13; - /** - * Risk Assessment - * - * Generated from protobuf enum RA = 14; - */ - const RA = 14; - /** - * System Services and Acquisition - * - * Generated from protobuf enum SA = 15; - */ - const SA = 15; - /** - * System and Communications Protection - * - * Generated from protobuf enum SC = 16; - */ - const SC = 16; - /** - * System and Information Integrity - * - * Generated from protobuf enum SI = 17; - */ - const SI = 17; - /** - * Supply Chain Risk Management - * - * Generated from protobuf enum SR = 18; - */ - const SR = 18; - - private static $valueToName = [ - self::FAMILY_UNSPECIFIED => 'FAMILY_UNSPECIFIED', - self::AC => 'AC', - self::AT => 'AT', - self::AU => 'AU', - self::CA => 'CA', - self::CM => 'CM', - self::CP => 'CP', - self::IA => 'IA', - self::IR => 'IR', - self::MA => 'MA', - self::MP => 'MP', - self::PE => 'PE', - self::PL => 'PL', - self::PS => 'PS', - self::RA => 'RA', - self::SA => 'SA', - self::SC => 'SC', - self::SI => 'SI', - self::SR => 'SR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Family::class, \Google\Cloud\AuditManager\V1\Control_Family::class); - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php deleted file mode 100644 index a4f89ebca3ab..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.auditmanager.v1.ControlDetails - */ -class ControlDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The control for which the findings are being reported. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; - */ - protected $control = null; - /** - * Output only. Overall status of the findings for the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compliance_state = 0; - /** - * Report summary with compliance, violation counts etc. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; - */ - protected $control_report_summary = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\AuditManager\V1\Control $control - * The control for which the findings are being reported. - * @type int $compliance_state - * Output only. Overall status of the findings for the control. - * @type \Google\Cloud\AuditManager\V1\ReportSummary $control_report_summary - * Report summary with compliance, violation counts etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * The control for which the findings are being reported. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; - * @return \Google\Cloud\AuditManager\V1\Control|null - */ - public function getControl() - { - return $this->control; - } - - public function hasControl() - { - return isset($this->control); - } - - public function clearControl() - { - unset($this->control); - } - - /** - * The control for which the findings are being reported. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; - * @param \Google\Cloud\AuditManager\V1\Control $var - * @return $this - */ - public function setControl($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Control::class); - $this->control = $var; - - return $this; - } - - /** - * Output only. Overall status of the findings for the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getComplianceState() - { - return $this->compliance_state; - } - - /** - * Output only. Overall status of the findings for the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setComplianceState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ComplianceState::class); - $this->compliance_state = $var; - - return $this; - } - - /** - * Report summary with compliance, violation counts etc. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; - * @return \Google\Cloud\AuditManager\V1\ReportSummary|null - */ - public function getControlReportSummary() - { - return $this->control_report_summary; - } - - public function hasControlReportSummary() - { - return isset($this->control_report_summary); - } - - public function clearControlReportSummary() - { - unset($this->control_report_summary); - } - - /** - * Report summary with compliance, violation counts etc. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; - * @param \Google\Cloud\AuditManager\V1\ReportSummary $var - * @return $this - */ - public function setControlReportSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); - $this->control_report_summary = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php deleted file mode 100644 index 0215080003f9..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.auditmanager.v1.ControlFamily - */ -class ControlFamily extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the regulatory control family. - * - * Generated from protobuf field string family_id = 1; - */ - protected $family_id = ''; - /** - * The display name of the regulatory control family. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_id - * The ID of the regulatory control family. - * @type string $display_name - * The display name of the regulatory control family. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the regulatory control family. - * - * Generated from protobuf field string family_id = 1; - * @return string - */ - public function getFamilyId() - { - return $this->family_id; - } - - /** - * The ID of the regulatory control family. - * - * Generated from protobuf field string family_id = 1; - * @param string $var - * @return $this - */ - public function setFamilyId($var) - { - GPBUtil::checkString($var, True); - $this->family_id = $var; - - return $this; - } - - /** - * The display name of the regulatory control family. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the regulatory control family. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php deleted file mode 100644 index 9415399f0c85..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.auditmanager.v1.DestinationDetails - */ -class DestinationDetails extends \Google\Protobuf\Internal\Message -{ - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_bucket_uri - * The Cloud Storage bucket where the audit report is/will be uploaded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage bucket where the audit report is/will be uploaded. - * - * Generated from protobuf field string gcs_bucket_uri = 1; - * @return string - */ - public function getGcsBucketUri() - { - return $this->readOneof(1); - } - - public function hasGcsBucketUri() - { - return $this->hasOneof(1); - } - - /** - * The Cloud Storage bucket where the audit report is/will be uploaded. - * - * Generated from protobuf field string gcs_bucket_uri = 1; - * @param string $var - * @return $this - */ - public function setGcsBucketUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php deleted file mode 100644 index ccbbdfd40469..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.auditmanager.v1.EnrollResourceRequest - */ -class EnrollResourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource to be enrolled to the audit manager. Scope format - * should be resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * organizations/{organization}/locations/{location} - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = ''; - /** - * Required. List of destination among which customer can choose to upload - * their reports during the audit process. While enrolling at a - * organization/folder level, customer can choose Cloud storage bucket in any - * project. If the audit is triggered at project level using the service agent - * at organization/folder level, all the destination options associated with - * respective organization/folder level service agent will be available to - * auditing projects. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $destinations; - - /** - * @param string $scope Required. The resource to be enrolled to the audit manager. Scope format - * should be resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * organizations/{organization}/locations/{location} - * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations Required. List of destination among which customer can choose to upload - * their reports during the audit process. While enrolling at a - * organization/folder level, customer can choose Cloud storage bucket in any - * project. If the audit is triggered at project level using the service agent - * at organization/folder level, all the destination options associated with - * respective organization/folder level service agent will be available to - * auditing projects. - * - * @return \Google\Cloud\AuditManager\V1\EnrollResourceRequest - * - * @experimental - */ - public static function build(string $scope, array $destinations): self - { - return (new self()) - ->setScope($scope) - ->setDestinations($destinations); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope - * Required. The resource to be enrolled to the audit manager. Scope format - * should be resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * organizations/{organization}/locations/{location} - * @type array<\Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination>|\Google\Protobuf\Internal\RepeatedField $destinations - * Required. List of destination among which customer can choose to upload - * their reports during the audit process. While enrolling at a - * organization/folder level, customer can choose Cloud storage bucket in any - * project. If the audit is triggered at project level using the service agent - * at organization/folder level, all the destination options associated with - * respective organization/folder level service agent will be available to - * auditing projects. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource to be enrolled to the audit manager. Scope format - * should be resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * organizations/{organization}/locations/{location} - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. The resource to be enrolled to the audit manager. Scope format - * should be resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * organizations/{organization}/locations/{location} - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Required. List of destination among which customer can choose to upload - * their reports during the audit process. While enrolling at a - * organization/folder level, customer can choose Cloud storage bucket in any - * project. If the audit is triggered at project level using the service agent - * at organization/folder level, all the destination options associated with - * respective organization/folder level service agent will be available to - * auditing projects. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestinations() - { - return $this->destinations; - } - - /** - * Required. List of destination among which customer can choose to upload - * their reports during the audit process. While enrolling at a - * organization/folder level, customer can choose Cloud storage bucket in any - * project. If the audit is triggered at project level using the service agent - * at organization/folder level, all the destination options associated with - * respective organization/folder level service agent will be available to - * auditing projects. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestinations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination::class); - $this->destinations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php deleted file mode 100644 index bb9570ad4a52..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination - */ -class EligibleDestination extends \Google\Protobuf\Internal\Message -{ - protected $eligible_destinations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $eligible_gcs_bucket - * The Cloud Storage bucket location where the audit report and evidences - * can be uploaded during the `GenerateAuditReport` API call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage bucket location where the audit report and evidences - * can be uploaded during the `GenerateAuditReport` API call. - * - * Generated from protobuf field string eligible_gcs_bucket = 3; - * @return string - */ - public function getEligibleGcsBucket() - { - return $this->readOneof(3); - } - - public function hasEligibleGcsBucket() - { - return $this->hasOneof(3); - } - - /** - * The Cloud Storage bucket location where the audit report and evidences - * can be uploaded during the `GenerateAuditReport` API call. - * - * Generated from protobuf field string eligible_gcs_bucket = 3; - * @param string $var - * @return $this - */ - public function setEligibleGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getEligibleDestinations() - { - return $this->whichOneof("eligible_destinations"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EligibleDestination::class, \Google\Cloud\AuditManager\V1\EnrollResourceRequest_EligibleDestination::class); - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php deleted file mode 100644 index 40f13d3b4aac..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.auditmanager.v1.Enrollment - */ -class Enrollment extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of this Enrollment, in the format of scope given in - * request. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The locations where the generated reports can be uploaded. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $destination_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of this Enrollment, in the format of scope given in - * request. - * @type array<\Google\Cloud\AuditManager\V1\DestinationDetails>|\Google\Protobuf\Internal\RepeatedField $destination_details - * Output only. The locations where the generated reports can be uploaded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of this Enrollment, in the format of scope given in - * request. - * - * 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 Enrollment, in the format of scope given in - * request. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The locations where the generated reports can be uploaded. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestinationDetails() - { - return $this->destination_details; - } - - /** - * Output only. The locations where the generated reports can be uploaded. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\AuditManager\V1\DestinationDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestinationDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\DestinationDetails::class); - $this->destination_details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php deleted file mode 100644 index dea4b2f5a7bd..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php +++ /dev/null @@ -1,259 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditReportRequest - */ -class GenerateAuditReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = ''; - /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $compliance_standard = ''; - /** - * Required. The format in which the audit report should be created. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_format = 0; - /** - * Required. Compliance framework against which the Report must be generated. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $compliance_framework = ''; - protected $destination; - - /** - * @param string $scope Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * @param string $gcsUri Destination Cloud storage bucket where report and evidence must be - * uploaded. The Cloud storage bucket provided here must be selected among - * the buckets entered during the enrollment process. - * @param string $complianceStandard Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * @param int $reportFormat Required. The format in which the audit report should be created. - * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat} - * - * @return \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest - * - * @experimental - */ - public static function build(string $scope, string $gcsUri, string $complianceStandard, int $reportFormat): self - { - return (new self()) - ->setScope($scope) - ->setGcsUri($gcsUri) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_uri - * Destination Cloud storage bucket where report and evidence must be - * uploaded. The Cloud storage bucket provided here must be selected among - * the buckets entered during the enrollment process. - * @type string $scope - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * @type string $compliance_standard - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * @type int $report_format - * Required. The format in which the audit report should be created. - * @type string $compliance_framework - * Required. Compliance framework against which the Report must be generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Destination Cloud storage bucket where report and evidence must be - * uploaded. The Cloud storage bucket provided here must be selected among - * the buckets entered during the enrollment process. - * - * Generated from protobuf field string gcs_uri = 2; - * @return string - */ - public function getGcsUri() - { - return $this->readOneof(2); - } - - public function hasGcsUri() - { - return $this->hasOneof(2); - } - - /** - * Destination Cloud storage bucket where report and evidence must be - * uploaded. The Cloud storage bucket provided here must be selected among - * the buckets entered during the enrollment process. - * - * Generated from protobuf field string gcs_uri = 2; - * @param string $var - * @return $this - */ - public function setGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getComplianceStandard() - { - return $this->compliance_standard; - } - - /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setComplianceStandard($var) - { - GPBUtil::checkString($var, True); - $this->compliance_standard = $var; - - return $this; - } - - /** - * Required. The format in which the audit report should be created. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReportFormat() - { - return $this->report_format; - } - - /** - * Required. The format in which the audit report should be created. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReportFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat::class); - $this->report_format = $var; - - return $this; - } - - /** - * Required. Compliance framework against which the Report must be generated. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getComplianceFramework() - { - return $this->compliance_framework; - } - - /** - * Required. Compliance framework against which the Report must be generated. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setComplianceFramework($var) - { - GPBUtil::checkString($var, True); - $this->compliance_framework = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php deleted file mode 100644 index 742f86822471..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat - */ -class AuditReportFormat -{ - /** - * Unspecified. Invalid state. - * - * Generated from protobuf enum AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; - */ - const AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; - /** - * Audit Report creation format is Open Document. - * - * Generated from protobuf enum AUDIT_REPORT_FORMAT_ODF = 1; - */ - const AUDIT_REPORT_FORMAT_ODF = 1; - - private static $valueToName = [ - self::AUDIT_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_REPORT_FORMAT_UNSPECIFIED', - self::AUDIT_REPORT_FORMAT_ODF => 'AUDIT_REPORT_FORMAT_ODF', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AuditReportFormat::class, \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest_AuditReportFormat::class); - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php deleted file mode 100644 index fe0ff8bcfef7..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest - */ -class GenerateAuditScopeReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = ''; - /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $compliance_standard = ''; - /** - * Required. The format in which the Scope report bytes should be returned. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_format = 0; - /** - * Required. Compliance framework against which the Scope Report must be - * generated. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $compliance_framework = ''; - - /** - * @param string $scope Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * @param string $complianceStandard Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * @param int $reportFormat Required. The format in which the Scope report bytes should be returned. - * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat} - * - * @return \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest - * - * @experimental - */ - public static function build(string $scope, string $complianceStandard, int $reportFormat): self - { - return (new self()) - ->setScope($scope) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * @type string $compliance_standard - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * @type int $report_format - * Required. The format in which the Scope report bytes should be returned. - * @type string $compliance_framework - * Required. Compliance framework against which the Scope Report must be - * generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getComplianceStandard() - { - return $this->compliance_standard; - } - - /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setComplianceStandard($var) - { - GPBUtil::checkString($var, True); - $this->compliance_standard = $var; - - return $this; - } - - /** - * Required. The format in which the Scope report bytes should be returned. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReportFormat() - { - return $this->report_format; - } - - /** - * Required. The format in which the Scope report bytes should be returned. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReportFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat::class); - $this->report_format = $var; - - return $this; - } - - /** - * Required. Compliance framework against which the Scope Report must be - * generated. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getComplianceFramework() - { - return $this->compliance_framework; - } - - /** - * Required. Compliance framework against which the Scope Report must be - * generated. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setComplianceFramework($var) - { - GPBUtil::checkString($var, True); - $this->compliance_framework = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php deleted file mode 100644 index 8bfd8b87c8ad..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat - */ -class AuditScopeReportFormat -{ - /** - * Unspecified. Invalid format. - * - * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; - */ - const AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; - /** - * Audit Scope Report creation format is Open Document. - * - * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; - */ - const AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; - - private static $valueToName = [ - self::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED', - self::AUDIT_SCOPE_REPORT_FORMAT_ODF => 'AUDIT_SCOPE_REPORT_FORMAT_ODF', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AuditScopeReportFormat::class, \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest_AuditScopeReportFormat::class); - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php deleted file mode 100644 index f8fe2b3be2af..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.auditmanager.v1.GetAuditReportRequest - */ -class GetAuditReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} - * Please see {@see AuditManagerClient::auditReportName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\GetAuditReportRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php deleted file mode 100644 index ccf270941f4d..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest - */ -class GetResourceEnrollmentStatusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * Please see {@see AuditManagerClient::resourceEnrollmentStatusName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\GetResourceEnrollmentStatusRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php deleted file mode 100644 index 8f1ade60482d..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.auditmanager.v1.ListAuditReportsRequest - */ -class ListAuditReportsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent scope for which to list the reports. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of resources to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent scope for which to list the reports. Please see - * {@see AuditManagerClient::folderLocationName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\ListAuditReportsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent scope for which to list the reports. - * @type int $page_size - * Optional. The maximum number of resources to return. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent scope for which to list the reports. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent scope for which to list the reports. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 resources to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of resources to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php deleted file mode 100644 index b34bd51a69de..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.auditmanager.v1.ListAuditReportsResponse - */ -class ListAuditReportsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The audit reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $audit_reports; - /** - * Output only. The token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\AuditManager\V1\AuditReport>|\Google\Protobuf\Internal\RepeatedField $audit_reports - * Output only. The audit reports. - * @type string $next_page_token - * Output only. The token to retrieve the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The audit reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAuditReports() - { - return $this->audit_reports; - } - - /** - * Output only. The audit reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\AuditManager\V1\AuditReport>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAuditReports($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\AuditReport::class); - $this->audit_reports = $arr; - - return $this; - } - - /** - * Output only. The token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. The token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php deleted file mode 100644 index eb9b8e37a7b2..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.auditmanager.v1.ListControlsRequest - */ -class ListControlsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of resources to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} - * Please see {@see AuditManagerClient::standardName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\ListControlsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} - * @type int $page_size - * Optional. The maximum number of resources to return. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 resources to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of resources to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php deleted file mode 100644 index 411b54dd886e..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.auditmanager.v1.ListControlsResponse - */ -class ListControlsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The controls for the compliance standard. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $controls; - /** - * Output only. The token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\AuditManager\V1\Control>|\Google\Protobuf\Internal\RepeatedField $controls - * Output only. The controls for the compliance standard. - * @type string $next_page_token - * Output only. The token to retrieve the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The controls for the compliance standard. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getControls() - { - return $this->controls; - } - - /** - * Output only. The controls for the compliance standard. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\AuditManager\V1\Control>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setControls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\Control::class); - $this->controls = $arr; - - return $this; - } - - /** - * Output only. The token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. The token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php deleted file mode 100644 index fc57a61755ae..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest - */ -class ListResourceEnrollmentStatusesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent scope for which the list of resources with enrollments - * are required. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of resources to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent scope for which the list of resources with enrollments - * are required. Please see - * {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent scope for which the list of resources with enrollments - * are required. - * @type int $page_size - * Optional. The maximum number of resources to return. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent scope for which the list of resources with enrollments - * are required. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent scope for which the list of resources with enrollments - * are required. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 resources to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of resources to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php deleted file mode 100644 index 1c75e14711ee..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse - */ -class ListResourceEnrollmentStatusesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resources with their enrollment status. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; - */ - private $resource_enrollment_statuses; - /** - * Output only. The token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus>|\Google\Protobuf\Internal\RepeatedField $resource_enrollment_statuses - * The resources with their enrollment status. - * @type string $next_page_token - * Output only. The token to retrieve the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * The resources with their enrollment status. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceEnrollmentStatuses() - { - return $this->resource_enrollment_statuses; - } - - /** - * The resources with their enrollment status. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; - * @param array<\Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceEnrollmentStatuses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus::class); - $this->resource_enrollment_statuses = $arr; - - return $this; - } - - /** - * Output only. The token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. The token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php deleted file mode 100644 index 6baf524d9a02..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.auditmanager.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php deleted file mode 100644 index 8abd675373a4..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.auditmanager.v1.OperationState - */ -class OperationState -{ - /** - * Unspecified. Invalid state. - * - * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; - */ - const OPERATION_STATE_UNSPECIFIED = 0; - /** - * Audit report generation process has not started. - * - * Generated from protobuf enum OPERATION_STATE_NOT_STARTED = 10; - */ - const OPERATION_STATE_NOT_STARTED = 10; - /** - * Audit Manager is currently evaluating the workloads against specific - * standard. - * - * Generated from protobuf enum OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; - */ - const OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; - /** - * Audit Manager has completed Evaluation for the workload. - * - * Generated from protobuf enum OPERATION_STATE_EVALUATION_DONE = 21; - */ - const OPERATION_STATE_EVALUATION_DONE = 21; - /** - * Audit Manager is creating audit report from the evaluated data. - * - * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; - */ - const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; - /** - * Audit Manager has completed generation of the audit report. - * - * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; - */ - const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; - /** - * Audit Manager is uploading the audit report and evidences to the customer - * provided destination. - * - * Generated from protobuf enum OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; - */ - const OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; - /** - * Audit report generation process is completed. - * - * Generated from protobuf enum OPERATION_STATE_DONE = 50; - */ - const OPERATION_STATE_DONE = 50; - /** - * Audit report generation process has failed. - * - * Generated from protobuf enum OPERATION_STATE_FAILED = 60; - */ - const OPERATION_STATE_FAILED = 60; - - private static $valueToName = [ - self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', - self::OPERATION_STATE_NOT_STARTED => 'OPERATION_STATE_NOT_STARTED', - self::OPERATION_STATE_EVALUATION_IN_PROGRESS => 'OPERATION_STATE_EVALUATION_IN_PROGRESS', - self::OPERATION_STATE_EVALUATION_DONE => 'OPERATION_STATE_EVALUATION_DONE', - self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS', - self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE', - self::OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS', - self::OPERATION_STATE_DONE => 'OPERATION_STATE_DONE', - self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php deleted file mode 100644 index 8aab4c6e7dfe..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.auditmanager.v1.ReportGenerationProgress - */ -class ReportGenerationProgress extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current state of execution for report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. States the reason of failure during the audit report - * generation process. This field is set only if the state attribute is - * OPERATION_STATE_FAILED. - * - * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_reason = ''; - /** - * Shows the progress of the CESS service evaluation process. The progress is - * defined in terms of percentage complete and is being fetched from the CESS - * service. - * - * Generated from protobuf field double evaluation_percent_complete = 20; - */ - protected $evaluation_percent_complete = 0.0; - /** - * Shows the report generation progress of the CESS Result Processor Service. - * The // progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_generation_in_progress is non zero - * then evaluation_percent_complete will be 100%. - * - * Generated from protobuf field double report_generation_percent_complete = 30; - */ - protected $report_generation_percent_complete = 0.0; - /** - * Shows the report uploading progress of the CESS Result Processor Service. - * The progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_uploading_in_progress is non zero - * then evaluation_percent_complete and report_generation_percent_complete - * will be 100%. - * - * Generated from protobuf field double report_uploading_percent_complete = 40; - */ - protected $report_uploading_percent_complete = 0.0; - /** - * Output only. The Cloud Storage bucket where the audit report will be - * uploaded once the evaluation process is completed. - * - * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $destination_gcs_bucket = ''; - /** - * Output only. The name of the audit report. - * - * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $audit_report = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. The current state of execution for report generation. - * @type string $failure_reason - * Output only. States the reason of failure during the audit report - * generation process. This field is set only if the state attribute is - * OPERATION_STATE_FAILED. - * @type float $evaluation_percent_complete - * Shows the progress of the CESS service evaluation process. The progress is - * defined in terms of percentage complete and is being fetched from the CESS - * service. - * @type float $report_generation_percent_complete - * Shows the report generation progress of the CESS Result Processor Service. - * The // progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_generation_in_progress is non zero - * then evaluation_percent_complete will be 100%. - * @type float $report_uploading_percent_complete - * Shows the report uploading progress of the CESS Result Processor Service. - * The progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_uploading_in_progress is non zero - * then evaluation_percent_complete and report_generation_percent_complete - * will be 100%. - * @type string $destination_gcs_bucket - * Output only. The Cloud Storage bucket where the audit report will be - * uploaded once the evaluation process is completed. - * @type string $audit_report - * Output only. The name of the audit report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current state of execution for report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of execution for report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. States the reason of failure during the audit report - * generation process. This field is set only if the state attribute is - * OPERATION_STATE_FAILED. - * - * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * Output only. States the reason of failure during the audit report - * generation process. This field is set only if the state attribute is - * OPERATION_STATE_FAILED. - * - * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFailureReason($var) - { - GPBUtil::checkString($var, True); - $this->failure_reason = $var; - - return $this; - } - - /** - * Shows the progress of the CESS service evaluation process. The progress is - * defined in terms of percentage complete and is being fetched from the CESS - * service. - * - * Generated from protobuf field double evaluation_percent_complete = 20; - * @return float - */ - public function getEvaluationPercentComplete() - { - return $this->evaluation_percent_complete; - } - - /** - * Shows the progress of the CESS service evaluation process. The progress is - * defined in terms of percentage complete and is being fetched from the CESS - * service. - * - * Generated from protobuf field double evaluation_percent_complete = 20; - * @param float $var - * @return $this - */ - public function setEvaluationPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->evaluation_percent_complete = $var; - - return $this; - } - - /** - * Shows the report generation progress of the CESS Result Processor Service. - * The // progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_generation_in_progress is non zero - * then evaluation_percent_complete will be 100%. - * - * Generated from protobuf field double report_generation_percent_complete = 30; - * @return float - */ - public function getReportGenerationPercentComplete() - { - return $this->report_generation_percent_complete; - } - - /** - * Shows the report generation progress of the CESS Result Processor Service. - * The // progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_generation_in_progress is non zero - * then evaluation_percent_complete will be 100%. - * - * Generated from protobuf field double report_generation_percent_complete = 30; - * @param float $var - * @return $this - */ - public function setReportGenerationPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->report_generation_percent_complete = $var; - - return $this; - } - - /** - * Shows the report uploading progress of the CESS Result Processor Service. - * The progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_uploading_in_progress is non zero - * then evaluation_percent_complete and report_generation_percent_complete - * will be 100%. - * - * Generated from protobuf field double report_uploading_percent_complete = 40; - * @return float - */ - public function getReportUploadingPercentComplete() - { - return $this->report_uploading_percent_complete; - } - - /** - * Shows the report uploading progress of the CESS Result Processor Service. - * The progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_uploading_in_progress is non zero - * then evaluation_percent_complete and report_generation_percent_complete - * will be 100%. - * - * Generated from protobuf field double report_uploading_percent_complete = 40; - * @param float $var - * @return $this - */ - public function setReportUploadingPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->report_uploading_percent_complete = $var; - - return $this; - } - - /** - * Output only. The Cloud Storage bucket where the audit report will be - * uploaded once the evaluation process is completed. - * - * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDestinationGcsBucket() - { - return $this->destination_gcs_bucket; - } - - /** - * Output only. The Cloud Storage bucket where the audit report will be - * uploaded once the evaluation process is completed. - * - * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDestinationGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->destination_gcs_bucket = $var; - - return $this; - } - - /** - * Output only. The name of the audit report. - * - * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getAuditReport() - { - return $this->audit_report; - } - - /** - * Output only. The name of the audit report. - * - * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAuditReport($var) - { - GPBUtil::checkString($var, True); - $this->audit_report = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php deleted file mode 100644 index f1521d5ed1d6..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.auditmanager.v1.ReportSummary - */ -class ReportSummary extends \Google\Protobuf\Internal\Message -{ - /** - * Total number of checks. - * - * Generated from protobuf field int32 total_count = 1; - */ - protected $total_count = 0; - /** - * Number of compliant checks. - * - * Generated from protobuf field int32 compliant_count = 2; - */ - protected $compliant_count = 0; - /** - * Number of checks with violations. - * - * Generated from protobuf field int32 violation_count = 3; - */ - protected $violation_count = 0; - /** - * Number of checks with "manual review needed" status. - * - * Generated from protobuf field int32 manual_review_needed_count = 4; - */ - protected $manual_review_needed_count = 0; - /** - * Number of checks that could not be performed due to errors. - * - * Generated from protobuf field int32 error_count = 5; - */ - protected $error_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $total_count - * Total number of checks. - * @type int $compliant_count - * Number of compliant checks. - * @type int $violation_count - * Number of checks with violations. - * @type int $manual_review_needed_count - * Number of checks with "manual review needed" status. - * @type int $error_count - * Number of checks that could not be performed due to errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Total number of checks. - * - * Generated from protobuf field int32 total_count = 1; - * @return int - */ - public function getTotalCount() - { - return $this->total_count; - } - - /** - * Total number of checks. - * - * Generated from protobuf field int32 total_count = 1; - * @param int $var - * @return $this - */ - public function setTotalCount($var) - { - GPBUtil::checkInt32($var); - $this->total_count = $var; - - return $this; - } - - /** - * Number of compliant checks. - * - * Generated from protobuf field int32 compliant_count = 2; - * @return int - */ - public function getCompliantCount() - { - return $this->compliant_count; - } - - /** - * Number of compliant checks. - * - * Generated from protobuf field int32 compliant_count = 2; - * @param int $var - * @return $this - */ - public function setCompliantCount($var) - { - GPBUtil::checkInt32($var); - $this->compliant_count = $var; - - return $this; - } - - /** - * Number of checks with violations. - * - * Generated from protobuf field int32 violation_count = 3; - * @return int - */ - public function getViolationCount() - { - return $this->violation_count; - } - - /** - * Number of checks with violations. - * - * Generated from protobuf field int32 violation_count = 3; - * @param int $var - * @return $this - */ - public function setViolationCount($var) - { - GPBUtil::checkInt32($var); - $this->violation_count = $var; - - return $this; - } - - /** - * Number of checks with "manual review needed" status. - * - * Generated from protobuf field int32 manual_review_needed_count = 4; - * @return int - */ - public function getManualReviewNeededCount() - { - return $this->manual_review_needed_count; - } - - /** - * Number of checks with "manual review needed" status. - * - * Generated from protobuf field int32 manual_review_needed_count = 4; - * @param int $var - * @return $this - */ - public function setManualReviewNeededCount($var) - { - GPBUtil::checkInt32($var); - $this->manual_review_needed_count = $var; - - return $this; - } - - /** - * Number of checks that could not be performed due to errors. - * - * Generated from protobuf field int32 error_count = 5; - * @return int - */ - public function getErrorCount() - { - return $this->error_count; - } - - /** - * Number of checks that could not be performed due to errors. - * - * Generated from protobuf field int32 error_count = 5; - * @param int $var - * @return $this - */ - public function setErrorCount($var) - { - GPBUtil::checkInt32($var); - $this->error_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php deleted file mode 100644 index 0df173c817c8..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php +++ /dev/null @@ -1,224 +0,0 @@ -google.cloud.auditmanager.v1.ResourceEnrollmentStatus - */ -class ResourceEnrollmentStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of this resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Enrollment which contains enrolled destination details for a - * resource - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $enrollment = null; - /** - * Output only. Is resource enrolled. - * - * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $enrolled = false; - /** - * Output only. Display name of the project/folder/organization. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. Enrollment state of the resource. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $enrollment_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of this resource. - * @type \Google\Cloud\AuditManager\V1\Enrollment $enrollment - * Output only. Enrollment which contains enrolled destination details for a - * resource - * @type bool $enrolled - * Output only. Is resource enrolled. - * @type string $display_name - * Output only. Display name of the project/folder/organization. - * @type int $enrollment_state - * Output only. Enrollment state of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of this resource. - * - * 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 resource. - * - * 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. Enrollment which contains enrolled destination details for a - * resource - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\Enrollment|null - */ - public function getEnrollment() - { - return $this->enrollment; - } - - public function hasEnrollment() - { - return isset($this->enrollment); - } - - public function clearEnrollment() - { - unset($this->enrollment); - } - - /** - * Output only. Enrollment which contains enrolled destination details for a - * resource - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\Enrollment $var - * @return $this - */ - public function setEnrollment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Enrollment::class); - $this->enrollment = $var; - - return $this; - } - - /** - * Output only. Is resource enrolled. - * - * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - * @deprecated - */ - public function getEnrolled() - { - if ($this->enrolled !== false) { - @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); - } - return $this->enrolled; - } - - /** - * Output only. Is resource enrolled. - * - * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setEnrolled($var) - { - @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->enrolled = $var; - - return $this; - } - - /** - * Output only. Display name of the project/folder/organization. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. Display name of the project/folder/organization. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Enrollment state of the resource. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEnrollmentState() - { - return $this->enrollment_state; - } - - /** - * Output only. Enrollment state of the resource. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEnrollmentState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus\ResourceEnrollmentState::class); - $this->enrollment_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php deleted file mode 100644 index 5837eb0b14a1..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState - */ -class ResourceEnrollmentState -{ - /** - * Unspecified. Invalid state. - * - * Generated from protobuf enum RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; - */ - const RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; - /** - * Not enrolled. - * - * Generated from protobuf enum NOT_ENROLLED = 1; - */ - const NOT_ENROLLED = 1; - /** - * Resource is not enrolled but the parent is enrolled. - * - * Generated from protobuf enum INHERITED = 2; - */ - const INHERITED = 2; - /** - * Enrolled. - * - * Generated from protobuf enum ENROLLED = 3; - */ - const ENROLLED = 3; - - private static $valueToName = [ - self::RESOURCE_ENROLLMENT_STATE_UNSPECIFIED => 'RESOURCE_ENROLLMENT_STATE_UNSPECIFIED', - self::NOT_ENROLLED => 'NOT_ENROLLED', - self::INHERITED => 'INHERITED', - self::ENROLLED => 'ENROLLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceEnrollmentState::class, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus_ResourceEnrollmentState::class); - diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php deleted file mode 100644 index 1a5418fe6f06..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php +++ /dev/null @@ -1,81 +0,0 @@ -setScope($scope) - ->setDestinations($destinations); - - // Call the API and handle any network failures. - try { - /** @var Enrollment $response */ - $response = $auditManagerClient->enrollResource($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $scope = '[SCOPE]'; - - enroll_resource_sample($scope); -} -// [END auditmanager_v1_generated_AuditManager_EnrollResource_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php deleted file mode 100644 index 778e7c321587..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php +++ /dev/null @@ -1,101 +0,0 @@ -setScope($scope) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $auditManagerClient->generateAuditReport($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AuditReport $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $scope = '[SCOPE]'; - $complianceStandard = '[COMPLIANCE_STANDARD]'; - $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; - - generate_audit_report_sample($scope, $complianceStandard, $reportFormat, $complianceFramework); -} -// [END auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php deleted file mode 100644 index 07796a5927be..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php +++ /dev/null @@ -1,96 +0,0 @@ -setScope($scope) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - - // Call the API and handle any network failures. - try { - /** @var AuditScopeReport $response */ - $response = $auditManagerClient->generateAuditScopeReport($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $scope = '[SCOPE]'; - $complianceStandard = '[COMPLIANCE_STANDARD]'; - $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; - - generate_audit_scope_report_sample( - $scope, - $complianceStandard, - $reportFormat, - $complianceFramework - ); -} -// [END auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php deleted file mode 100644 index fe898f54cd38..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AuditReport $response */ - $response = $auditManagerClient->getAuditReport($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AuditManagerClient::auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); - - get_audit_report_sample($formattedName); -} -// [END auditmanager_v1_generated_AuditManager_GetAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php deleted file mode 100644 index 1dea4b7c3f71..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END auditmanager_v1_generated_AuditManager_GetLocation_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php deleted file mode 100644 index 5847394ae22a..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ResourceEnrollmentStatus $response */ - $response = $auditManagerClient->getResourceEnrollmentStatus($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AuditManagerClient::resourceEnrollmentStatusName( - '[FOLDER]', - '[LOCATION]', - '[RESOURCE_ENROLLMENT_STATUS]' - ); - - get_resource_enrollment_status_sample($formattedName); -} -// [END auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php deleted file mode 100644 index 5237cc95bf1d..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $auditManagerClient->listAuditReports($request); - - /** @var AuditReport $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AuditManagerClient::folderLocationName('[FOLDER]', '[LOCATION]'); - - list_audit_reports_sample($formattedParent); -} -// [END auditmanager_v1_generated_AuditManager_ListAuditReports_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php deleted file mode 100644 index 23dad617a496..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $auditManagerClient->listControls($request); - - /** @var Control $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AuditManagerClient::standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); - - list_controls_sample($formattedParent); -} -// [END auditmanager_v1_generated_AuditManager_ListControls_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php deleted file mode 100644 index ccceb62bf8af..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php +++ /dev/null @@ -1,69 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END auditmanager_v1_generated_AuditManager_ListLocations_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php deleted file mode 100644 index 2e9fe28a0ab6..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $auditManagerClient->listResourceEnrollmentStatuses($request); - - /** @var ResourceEnrollmentStatus $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AuditManagerClient::enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); - - list_resource_enrollment_statuses_sample($formattedParent); -} -// [END auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync] diff --git a/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php b/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php deleted file mode 100644 index 076bac4ee300..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php +++ /dev/null @@ -1,855 +0,0 @@ - enrollResourceAsync(EnrollResourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAuditReportAsync(GenerateAuditReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAuditScopeReportAsync(GenerateAuditScopeReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAuditReportAsync(GetAuditReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface getResourceEnrollmentStatusAsync(GetResourceEnrollmentStatusRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAuditReportsAsync(ListAuditReportsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listControlsAsync(ListControlsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listResourceEnrollmentStatusesAsync(ListResourceEnrollmentStatusesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class AuditManagerClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.auditmanager.v1.AuditManager'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'auditmanager.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'auditmanager.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/audit_manager_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/audit_manager_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/audit_manager_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/audit_manager_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a audit_report - * resource. - * - * @param string $project - * @param string $location - * @param string $auditReport - * - * @return string The formatted audit_report resource. - */ - public static function auditReportName(string $project, string $location, string $auditReport): string - { - return self::getPathTemplate('auditReport')->render([ - 'project' => $project, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * enrollment_status_scope resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted enrollment_status_scope resource. - */ - public static function enrollmentStatusScopeName(string $folder, string $location): string - { - return self::getPathTemplate('enrollmentStatusScope')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted folder_location resource. - */ - public static function folderLocationName(string $folder, string $location): string - { - return self::getPathTemplate('folderLocation')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_audit_report resource. - * - * @param string $folder - * @param string $location - * @param string $auditReport - * - * @return string The formatted folder_location_audit_report resource. - */ - public static function folderLocationAuditReportName(string $folder, string $location, string $auditReport): string - { - return self::getPathTemplate('folderLocationAuditReport')->render([ - 'folder' => $folder, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_resource_enrollment_status resource. - * - * @param string $folder - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted folder_location_resource_enrollment_status resource. - */ - public static function folderLocationResourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('folderLocationResourceEnrollmentStatus')->render([ - 'folder' => $folder, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_standard resource. - * - * @param string $folder - * @param string $location - * @param string $standard - * - * @return string The formatted folder_location_standard resource. - */ - public static function folderLocationStandardName(string $folder, string $location, string $standard): string - { - return self::getPathTemplate('folderLocationStandard')->render([ - 'folder' => $folder, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * 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 - * organization_location resource. - * - * @param string $organization - * @param string $location - * - * @return string The formatted organization_location resource. - */ - public static function organizationLocationName(string $organization, string $location): string - { - return self::getPathTemplate('organizationLocation')->render([ - 'organization' => $organization, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_resource_enrollment_status resource. - * - * @param string $organization - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted organization_location_resource_enrollment_status resource. - */ - public static function organizationLocationResourceEnrollmentStatusName(string $organization, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('organizationLocationResourceEnrollmentStatus')->render([ - 'organization' => $organization, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_standard resource. - * - * @param string $organization - * @param string $location - * @param string $standard - * - * @return string The formatted organization_location_standard resource. - */ - public static function organizationLocationStandardName(string $organization, string $location, string $standard): string - { - return self::getPathTemplate('organizationLocationStandard')->render([ - 'organization' => $organization, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_audit_report resource. - * - * @param string $project - * @param string $location - * @param string $auditReport - * - * @return string The formatted project_location_audit_report resource. - */ - public static function projectLocationAuditReportName(string $project, string $location, string $auditReport): string - { - return self::getPathTemplate('projectLocationAuditReport')->render([ - 'project' => $project, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_resource_enrollment_status resource. - * - * @param string $project - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted project_location_resource_enrollment_status resource. - */ - public static function projectLocationResourceEnrollmentStatusName(string $project, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('projectLocationResourceEnrollmentStatus')->render([ - 'project' => $project, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_standard resource. - * - * @param string $project - * @param string $location - * @param string $standard - * - * @return string The formatted project_location_standard resource. - */ - public static function projectLocationStandardName(string $project, string $location, string $standard): string - { - return self::getPathTemplate('projectLocationStandard')->render([ - 'project' => $project, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * resource_enrollment_status resource. - * - * @param string $folder - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted resource_enrollment_status resource. - */ - public static function resourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('resourceEnrollmentStatus')->render([ - 'folder' => $folder, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a standard - * resource. - * - * @param string $project - * @param string $location - * @param string $standard - * - * @return string The formatted standard resource. - */ - public static function standardName(string $project, string $location, string $standard): string - { - return self::getPathTemplate('standard')->render([ - 'project' => $project, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - auditReport: projects/{project}/locations/{location}/auditReports/{audit_report} - * - enrollmentStatusScope: folders/{folder}/locations/{location} - * - folderLocation: folders/{folder}/locations/{location} - * - folderLocationAuditReport: folders/{folder}/locations/{location}/auditReports/{audit_report} - * - folderLocationResourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - folderLocationStandard: folders/{folder}/locations/{location}/standards/{standard} - * - location: projects/{project}/locations/{location} - * - organizationLocation: organizations/{organization}/locations/{location} - * - organizationLocationResourceEnrollmentStatus: organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - organizationLocationStandard: organizations/{organization}/locations/{location}/standards/{standard} - * - projectLocationAuditReport: projects/{project}/locations/{location}/auditReports/{audit_report} - * - projectLocationResourceEnrollmentStatus: projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - projectLocationStandard: projects/{project}/locations/{location}/standards/{standard} - * - resourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - standard: projects/{project}/locations/{location}/standards/{standard} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'auditmanager.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\AuditManager\V1\AuditManagerClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new AuditManagerClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Enrolls the customer resource(folder/project/organization) to the audit - * manager service by creating the audit managers Service Agent in customers - * workload and granting required permissions to the Service Agent. Please - * note that if enrollment request is made on the already enrolled workload - * then enrollment is executed overriding the existing set of destinations. - * - * The async variant is {@see AuditManagerClient::enrollResourceAsync()} . - * - * @example samples/V1/AuditManagerClient/enroll_resource.php - * - * @param EnrollResourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Enrollment - * - * @throws ApiException Thrown if the API call fails. - */ - public function enrollResource(EnrollResourceRequest $request, array $callOptions = []): Enrollment - { - return $this->startApiCall('EnrollResource', $request, $callOptions)->wait(); - } - - /** - * Register the Audit Report generation requests and returns the OperationId - * using which the customer can track the report generation progress. - * - * The async variant is {@see AuditManagerClient::generateAuditReportAsync()} . - * - * @example samples/V1/AuditManagerClient/generate_audit_report.php - * - * @param GenerateAuditReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAuditReport(GenerateAuditReportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('GenerateAuditReport', $request, $callOptions)->wait(); - } - - /** - * Generates a demo report highlighting different responsibilities - * (Google/Customer/ shared) required to be fulfilled for the customer's - * workload to be compliant with the given standard. - * - * The async variant is {@see AuditManagerClient::generateAuditScopeReportAsync()} - * . - * - * @example samples/V1/AuditManagerClient/generate_audit_scope_report.php - * - * @param GenerateAuditScopeReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AuditScopeReport - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAuditScopeReport(GenerateAuditScopeReportRequest $request, array $callOptions = []): AuditScopeReport - { - return $this->startApiCall('GenerateAuditScopeReport', $request, $callOptions)->wait(); - } - - /** - * Get the overall audit report - * - * The async variant is {@see AuditManagerClient::getAuditReportAsync()} . - * - * @example samples/V1/AuditManagerClient/get_audit_report.php - * - * @param GetAuditReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AuditReport - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAuditReport(GetAuditReportRequest $request, array $callOptions = []): AuditReport - { - return $this->startApiCall('GetAuditReport', $request, $callOptions)->wait(); - } - - /** - * Get a resource along with its enrollment status. - * - * The async variant is - * {@see AuditManagerClient::getResourceEnrollmentStatusAsync()} . - * - * @example samples/V1/AuditManagerClient/get_resource_enrollment_status.php - * - * @param GetResourceEnrollmentStatusRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ResourceEnrollmentStatus - * - * @throws ApiException Thrown if the API call fails. - */ - public function getResourceEnrollmentStatus(GetResourceEnrollmentStatusRequest $request, array $callOptions = []): ResourceEnrollmentStatus - { - return $this->startApiCall('GetResourceEnrollmentStatus', $request, $callOptions)->wait(); - } - - /** - * Lists audit reports in the selected parent scope - * - * The async variant is {@see AuditManagerClient::listAuditReportsAsync()} . - * - * @example samples/V1/AuditManagerClient/list_audit_reports.php - * - * @param ListAuditReportsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAuditReports(ListAuditReportsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAuditReports', $request, $callOptions); - } - - /** - * Gets controls needed to be implemented to be compliant to a standard. - * - * The async variant is {@see AuditManagerClient::listControlsAsync()} . - * - * @example samples/V1/AuditManagerClient/list_controls.php - * - * @param ListControlsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listControls(ListControlsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListControls', $request, $callOptions); - } - - /** - * Fetches all resources under the parent along with their enrollment. - * - * The async variant is - * {@see AuditManagerClient::listResourceEnrollmentStatusesAsync()} . - * - * @example samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php - * - * @param ListResourceEnrollmentStatusesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listResourceEnrollmentStatuses(ListResourceEnrollmentStatusesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListResourceEnrollmentStatuses', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AuditManagerClient::getLocationAsync()} . - * - * @example samples/V1/AuditManagerClient/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. - This method can be called in two ways: - - * **List all public locations:** Use the path `GET /v1/locations`. - * **List project-visible locations:** Use the path - `GET /v1/projects/{project_id}/locations`. This may include public - locations as well as private or other locations specifically visible - to the project. - * - * The async variant is {@see AuditManagerClient::listLocationsAsync()} . - * - * @example samples/V1/AuditManagerClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json b/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json deleted file mode 100644 index cefc1825f767..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.auditmanager.v1", - "libraryPackage": "Google\\Cloud\\AuditManager\\V1", - "services": { - "AuditManager": { - "clients": { - "grpc": { - "libraryClient": "AuditManagerGapicClient", - "rpcs": { - "EnrollResource": { - "methods": [ - "enrollResource" - ] - }, - "GenerateAuditReport": { - "methods": [ - "generateAuditReport" - ] - }, - "GenerateAuditScopeReport": { - "methods": [ - "generateAuditScopeReport" - ] - }, - "GetAuditReport": { - "methods": [ - "getAuditReport" - ] - }, - "GetResourceEnrollmentStatus": { - "methods": [ - "getResourceEnrollmentStatus" - ] - }, - "ListAuditReports": { - "methods": [ - "listAuditReports" - ] - }, - "ListControls": { - "methods": [ - "listControls" - ] - }, - "ListResourceEnrollmentStatuses": { - "methods": [ - "listResourceEnrollmentStatuses" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json deleted file mode 100644 index 621862801f8f..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.cloud.auditmanager.v1.AuditManager": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "EnrollResource": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAuditReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAuditScopeReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAuditReport": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetResourceEnrollmentStatus": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAuditReports": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListControls": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListResourceEnrollmentStatuses": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php deleted file mode 100644 index f769ad7d7c3f..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php +++ /dev/null @@ -1,206 +0,0 @@ - [ - 'google.cloud.auditmanager.v1.AuditManager' => [ - 'GenerateAuditReport' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\AuditManager\V1\AuditReport', - 'metadataReturnType' => '\Google\Cloud\AuditManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'scope', - 'fieldAccessors' => [ - 'getScope', - ], - ], - ], - ], - 'EnrollResource' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\Enrollment', - 'headerParams' => [ - [ - 'keyName' => 'scope', - 'fieldAccessors' => [ - 'getScope', - ], - ], - ], - ], - 'GenerateAuditScopeReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\AuditScopeReport', - 'headerParams' => [ - [ - 'keyName' => 'scope', - 'fieldAccessors' => [ - 'getScope', - ], - ], - ], - ], - 'GetAuditReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\AuditReport', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetResourceEnrollmentStatus' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAuditReports' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAuditReports', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ListAuditReportsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListControls' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getControls', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ListControlsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListResourceEnrollmentStatuses' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResourceEnrollmentStatuses', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'auditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', - 'enrollmentStatusScope' => 'folders/{folder}/locations/{location}', - 'folderLocation' => 'folders/{folder}/locations/{location}', - 'folderLocationAuditReport' => 'folders/{folder}/locations/{location}/auditReports/{audit_report}', - 'folderLocationResourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'folderLocationStandard' => 'folders/{folder}/locations/{location}/standards/{standard}', - 'location' => 'projects/{project}/locations/{location}', - 'organizationLocation' => 'organizations/{organization}/locations/{location}', - 'organizationLocationResourceEnrollmentStatus' => 'organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'organizationLocationStandard' => 'organizations/{organization}/locations/{location}/standards/{standard}', - 'projectLocationAuditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', - 'projectLocationResourceEnrollmentStatus' => 'projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'projectLocationStandard' => 'projects/{project}/locations/{location}/standards/{standard}', - 'resourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'standard' => 'projects/{project}/locations/{location}/standards/{standard}', - ], - ], - ], -]; diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php deleted file mode 100644 index d8a89311d794..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php +++ /dev/null @@ -1,284 +0,0 @@ - [ - 'google.cloud.auditmanager.v1.AuditManager' => [ - 'EnrollResource' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=folders/*/locations/*}:enrollResource', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=projects/*/locations/*}:enrollResource', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}:enrollResource', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'scope' => [ - 'getters' => [ - 'getScope', - ], - ], - ], - ], - 'GenerateAuditReport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditReports:generate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditReports:generate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'scope' => [ - 'getters' => [ - 'getScope', - ], - ], - ], - ], - 'GenerateAuditScopeReport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditScopeReports:generate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditScopeReports:generate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'scope' => [ - 'getters' => [ - 'getScope', - ], - ], - ], - ], - 'GetAuditReport' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/auditReports/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/auditReports/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetResourceEnrollmentStatus' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAuditReports' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/auditReports', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/auditReports', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/auditReports', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListControls' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*/standards/*}/controls', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*/standards/*}/controls', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/standards/*}/controls', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListResourceEnrollmentStatuses' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatuses', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php b/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php deleted file mode 100644 index d7b08ea65d24..000000000000 --- a/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php +++ /dev/null @@ -1,906 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AuditManagerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AuditManagerClient($options); - } - - /** @test */ - public function enrollResourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Enrollment(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $scope = 'scope109264468'; - $destinations = []; - $request = (new EnrollResourceRequest()) - ->setScope($scope) - ->setDestinations($destinations); - $response = $gapicClient->enrollResource($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getDestinations(); - $this->assertProtobufEquals($destinations, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enrollResourceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $scope = 'scope109264468'; - $destinations = []; - $request = (new EnrollResourceRequest()) - ->setScope($scope) - ->setDestinations($destinations); - try { - $gapicClient->enrollResource($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAuditReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/generateAuditReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $operationId = 'operationId-274116877'; - $complianceStandard2 = 'complianceStandard2-1079015980'; - $scope2 = 'scope21923941639'; - $complianceFramework2 = 'complianceFramework2-1333971955'; - $scopeId = 'scopeId-487349530'; - $expectedResponse = new AuditReport(); - $expectedResponse->setName($name); - $expectedResponse->setOperationId($operationId); - $expectedResponse->setComplianceStandard($complianceStandard2); - $expectedResponse->setScope($scope2); - $expectedResponse->setComplianceFramework($complianceFramework2); - $expectedResponse->setScopeId($scopeId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/generateAuditReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $scope = 'scope109264468'; - $complianceStandard = 'complianceStandard1339657825'; - $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditReportRequest()) - ->setScope($scope) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - $response = $gapicClient->generateAuditReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualApiRequestObject->getComplianceStandard(); - $this->assertProtobufEquals($complianceStandard, $actualValue); - $actualValue = $actualApiRequestObject->getReportFormat(); - $this->assertProtobufEquals($reportFormat, $actualValue); - $actualValue = $actualApiRequestObject->getComplianceFramework(); - $this->assertProtobufEquals($complianceFramework, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAuditReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/generateAuditReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $scope = 'scope109264468'; - $complianceStandard = 'complianceStandard1339657825'; - $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditReportRequest()) - ->setScope($scope) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - $response = $gapicClient->generateAuditReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAuditScopeReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $scopeReportContents = '-38'; - $name = 'name3373707'; - $expectedResponse = new AuditScopeReport(); - $expectedResponse->setScopeReportContents($scopeReportContents); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $scope = 'scope109264468'; - $complianceStandard = 'complianceStandard1339657825'; - $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditScopeReportRequest()) - ->setScope($scope) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - $response = $gapicClient->generateAuditScopeReport($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditScopeReport', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getComplianceStandard(); - $this->assertProtobufEquals($complianceStandard, $actualValue); - $actualValue = $actualRequestObject->getReportFormat(); - $this->assertProtobufEquals($reportFormat, $actualValue); - $actualValue = $actualRequestObject->getComplianceFramework(); - $this->assertProtobufEquals($complianceFramework, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAuditScopeReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $scope = 'scope109264468'; - $complianceStandard = 'complianceStandard1339657825'; - $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditScopeReportRequest()) - ->setScope($scope) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - try { - $gapicClient->generateAuditScopeReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuditReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $operationId = 'operationId-274116877'; - $complianceStandard = 'complianceStandard1339657825'; - $scope = 'scope109264468'; - $complianceFramework = 'complianceFramework1384085210'; - $scopeId = 'scopeId-487349530'; - $expectedResponse = new AuditReport(); - $expectedResponse->setName($name2); - $expectedResponse->setOperationId($operationId); - $expectedResponse->setComplianceStandard($complianceStandard); - $expectedResponse->setScope($scope); - $expectedResponse->setComplianceFramework($complianceFramework); - $expectedResponse->setScopeId($scopeId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); - $request = (new GetAuditReportRequest()) - ->setName($formattedName); - $response = $gapicClient->getAuditReport($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetAuditReport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuditReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); - $request = (new GetAuditReportRequest()) - ->setName($formattedName); - try { - $gapicClient->getAuditReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getResourceEnrollmentStatusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $enrolled = false; - $displayName = 'displayName1615086568'; - $expectedResponse = new ResourceEnrollmentStatus(); - $expectedResponse->setName($name2); - $expectedResponse->setEnrolled($enrolled); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); - $request = (new GetResourceEnrollmentStatusRequest()) - ->setName($formattedName); - $response = $gapicClient->getResourceEnrollmentStatus($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetResourceEnrollmentStatus', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getResourceEnrollmentStatusExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); - $request = (new GetResourceEnrollmentStatusRequest()) - ->setName($formattedName); - try { - $gapicClient->getResourceEnrollmentStatus($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuditReportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $auditReportsElement = new AuditReport(); - $auditReports = [ - $auditReportsElement, - ]; - $expectedResponse = new ListAuditReportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAuditReports($auditReports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); - $request = (new ListAuditReportsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAuditReports($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAuditReports()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListAuditReports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuditReportsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); - $request = (new ListAuditReportsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAuditReports($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listControlsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $controlsElement = new Control(); - $controls = [ - $controlsElement, - ]; - $expectedResponse = new ListControlsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setControls($controls); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); - $request = (new ListControlsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listControls($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getControls()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListControls', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listControlsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); - $request = (new ListControlsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listControls($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listResourceEnrollmentStatusesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourceEnrollmentStatusesElement = new ResourceEnrollmentStatus(); - $resourceEnrollmentStatuses = [ - $resourceEnrollmentStatusesElement, - ]; - $expectedResponse = new ListResourceEnrollmentStatusesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResourceEnrollmentStatuses($resourceEnrollmentStatuses); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); - $request = (new ListResourceEnrollmentStatusesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listResourceEnrollmentStatuses($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResourceEnrollmentStatuses()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListResourceEnrollmentStatuses', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listResourceEnrollmentStatusesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); - $request = (new ListResourceEnrollmentStatusesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listResourceEnrollmentStatuses($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 enrollResourceAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Enrollment(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $scope = 'scope109264468'; - $destinations = []; - $request = (new EnrollResourceRequest()) - ->setScope($scope) - ->setDestinations($destinations); - $response = $gapicClient->enrollResourceAsync($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.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getDestinations(); - $this->assertProtobufEquals($destinations, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}