1616 *
1717 * The version of the OpenAPI document: v3
1818 * Generated by: https://openapi-generator.tech
19- * OpenAPI Generator version: 7.3 .0
19+ * Generator version: 7.12 .0
2020 */
2121
2222/**
@@ -83,13 +83,13 @@ class AuditLogsApi
8383 * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
8484 */
8585 public function __construct (
86- ClientInterface $ client = null ,
87- Configuration $ config = null ,
88- HeaderSelector $ selector = null ,
89- $ hostIndex = 0
86+ ? ClientInterface $ client = null ,
87+ ? Configuration $ config = null ,
88+ ? HeaderSelector $ selector = null ,
89+ int $ hostIndex = 0
9090 ) {
9191 $ this ->client = $ client ?: new Client ();
92- $ this ->config = $ config ?: new Configuration ();
92+ $ this ->config = $ config ?: Configuration:: getDefaultConfiguration ();
9393 $ this ->headerSelector = $ selector ?: new HeaderSelector ();
9494 $ this ->hostIndex = $ hostIndex ;
9595 }
@@ -127,14 +127,14 @@ public function getConfig()
127127 *
128128 * Query audit logs
129129 *
130- * @param string[] $user_id Comma separated list of user ids to filter by. (optional)
131- * @param string[] $event_type Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). (optional)
132- * @param string[] $object_type Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) (optional)
133- * @param string[] $object_id Comma separated list of object ids to filter by. (optional)
134- * @param string $after Timestamp after which audit logs will be returned (optional)
135- * @param string $before Timestamp before which audit logs will be returned (optional)
136- * @param int $limit The number of logs to return. (optional)
137- * @param string[] $sort The sort direction for the audit logs. (Can only sort by timestamp). (optional)
130+ * @param string[]|null $user_id Comma separated list of user ids to filter by. (optional)
131+ * @param string[]|null $event_type Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). (optional)
132+ * @param string[]|null $object_type Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) (optional)
133+ * @param string[]|null $object_id Comma separated list of object ids to filter by. (optional)
134+ * @param string|null $after Timestamp after which audit logs will be returned (optional)
135+ * @param string|null $before Timestamp before which audit logs will be returned (optional)
136+ * @param int|null $limit The number of logs to return. (optional)
137+ * @param string[]|null $sort The sort direction for the audit logs. (Can only sort by timestamp). (optional)
138138 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation
139139 *
140140 * @throws \HubSpot\Client\Cms\AuditLogs\ApiException on non-2xx response or if the response body is not in the expected format
@@ -152,14 +152,14 @@ public function getPage($user_id = null, $event_type = null, $object_type = null
152152 *
153153 * Query audit logs
154154 *
155- * @param string[] $user_id Comma separated list of user ids to filter by. (optional)
156- * @param string[] $event_type Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). (optional)
157- * @param string[] $object_type Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) (optional)
158- * @param string[] $object_id Comma separated list of object ids to filter by. (optional)
159- * @param string $after Timestamp after which audit logs will be returned (optional)
160- * @param string $before Timestamp before which audit logs will be returned (optional)
161- * @param int $limit The number of logs to return. (optional)
162- * @param string[] $sort The sort direction for the audit logs. (Can only sort by timestamp). (optional)
155+ * @param string[]|null $user_id Comma separated list of user ids to filter by. (optional)
156+ * @param string[]|null $event_type Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). (optional)
157+ * @param string[]|null $object_type Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) (optional)
158+ * @param string[]|null $object_id Comma separated list of object ids to filter by. (optional)
159+ * @param string|null $after Timestamp after which audit logs will be returned (optional)
160+ * @param string|null $before Timestamp before which audit logs will be returned (optional)
161+ * @param int|null $limit The number of logs to return. (optional)
162+ * @param string[]|null $sort The sort direction for the audit logs. (Can only sort by timestamp). (optional)
163163 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation
164164 *
165165 * @throws \HubSpot\Client\Cms\AuditLogs\ApiException on non-2xx response or if the response body is not in the expected format
@@ -192,18 +192,6 @@ public function getPageWithHttpInfo($user_id = null, $event_type = null, $object
192192
193193 $ statusCode = $ response ->getStatusCode ();
194194
195- if ($ statusCode < 200 || $ statusCode > 299 ) {
196- throw new ApiException (
197- sprintf (
198- '[%d] Error connecting to the API (%s) ' ,
199- $ statusCode ,
200- (string ) $ request ->getUri ()
201- ),
202- $ statusCode ,
203- $ response ->getHeaders (),
204- (string ) $ response ->getBody ()
205- );
206- }
207195
208196 switch ($ statusCode ) {
209197 case 200 :
@@ -262,6 +250,19 @@ public function getPageWithHttpInfo($user_id = null, $event_type = null, $object
262250 ];
263251 }
264252
253+ if ($ statusCode < 200 || $ statusCode > 299 ) {
254+ throw new ApiException (
255+ sprintf (
256+ '[%d] Error connecting to the API (%s) ' ,
257+ $ statusCode ,
258+ (string ) $ request ->getUri ()
259+ ),
260+ $ statusCode ,
261+ $ response ->getHeaders (),
262+ (string ) $ response ->getBody ()
263+ );
264+ }
265+
265266 $ returnType = '\HubSpot\Client\Cms\AuditLogs\Model\CollectionResponsePublicAuditLog ' ;
266267 if ($ returnType === '\SplFileObject ' ) {
267268 $ content = $ response ->getBody (); //stream goes to serializer
@@ -318,14 +319,14 @@ public function getPageWithHttpInfo($user_id = null, $event_type = null, $object
318319 *
319320 * Query audit logs
320321 *
321- * @param string[] $user_id Comma separated list of user ids to filter by. (optional)
322- * @param string[] $event_type Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). (optional)
323- * @param string[] $object_type Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) (optional)
324- * @param string[] $object_id Comma separated list of object ids to filter by. (optional)
325- * @param string $after Timestamp after which audit logs will be returned (optional)
326- * @param string $before Timestamp before which audit logs will be returned (optional)
327- * @param int $limit The number of logs to return. (optional)
328- * @param string[] $sort The sort direction for the audit logs. (Can only sort by timestamp). (optional)
322+ * @param string[]|null $user_id Comma separated list of user ids to filter by. (optional)
323+ * @param string[]|null $event_type Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). (optional)
324+ * @param string[]|null $object_type Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) (optional)
325+ * @param string[]|null $object_id Comma separated list of object ids to filter by. (optional)
326+ * @param string|null $after Timestamp after which audit logs will be returned (optional)
327+ * @param string|null $before Timestamp before which audit logs will be returned (optional)
328+ * @param int|null $limit The number of logs to return. (optional)
329+ * @param string[]|null $sort The sort direction for the audit logs. (Can only sort by timestamp). (optional)
329330 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation
330331 *
331332 * @throws \InvalidArgumentException
@@ -346,14 +347,14 @@ function ($response) {
346347 *
347348 * Query audit logs
348349 *
349- * @param string[] $user_id Comma separated list of user ids to filter by. (optional)
350- * @param string[] $event_type Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). (optional)
351- * @param string[] $object_type Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) (optional)
352- * @param string[] $object_id Comma separated list of object ids to filter by. (optional)
353- * @param string $after Timestamp after which audit logs will be returned (optional)
354- * @param string $before Timestamp before which audit logs will be returned (optional)
355- * @param int $limit The number of logs to return. (optional)
356- * @param string[] $sort The sort direction for the audit logs. (Can only sort by timestamp). (optional)
350+ * @param string[]|null $user_id Comma separated list of user ids to filter by. (optional)
351+ * @param string[]|null $event_type Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). (optional)
352+ * @param string[]|null $object_type Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) (optional)
353+ * @param string[]|null $object_id Comma separated list of object ids to filter by. (optional)
354+ * @param string|null $after Timestamp after which audit logs will be returned (optional)
355+ * @param string|null $before Timestamp before which audit logs will be returned (optional)
356+ * @param int|null $limit The number of logs to return. (optional)
357+ * @param string[]|null $sort The sort direction for the audit logs. (Can only sort by timestamp). (optional)
357358 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation
358359 *
359360 * @throws \InvalidArgumentException
@@ -403,14 +404,14 @@ function ($exception) {
403404 /**
404405 * Create request for operation 'getPage'
405406 *
406- * @param string[] $user_id Comma separated list of user ids to filter by. (optional)
407- * @param string[] $event_type Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). (optional)
408- * @param string[] $object_type Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) (optional)
409- * @param string[] $object_id Comma separated list of object ids to filter by. (optional)
410- * @param string $after Timestamp after which audit logs will be returned (optional)
411- * @param string $before Timestamp before which audit logs will be returned (optional)
412- * @param int $limit The number of logs to return. (optional)
413- * @param string[] $sort The sort direction for the audit logs. (Can only sort by timestamp). (optional)
407+ * @param string[]|null $user_id Comma separated list of user ids to filter by. (optional)
408+ * @param string[]|null $event_type Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). (optional)
409+ * @param string[]|null $object_type Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) (optional)
410+ * @param string[]|null $object_id Comma separated list of object ids to filter by. (optional)
411+ * @param string|null $after Timestamp after which audit logs will be returned (optional)
412+ * @param string|null $before Timestamp before which audit logs will be returned (optional)
413+ * @param int|null $limit The number of logs to return. (optional)
414+ * @param string[]|null $sort The sort direction for the audit logs. (Can only sort by timestamp). (optional)
414415 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation
415416 *
416417 * @throws \InvalidArgumentException
0 commit comments