Skip to content

Commit aee68db

Browse files
1 parent d0c32a6 commit aee68db

6 files changed

Lines changed: 390 additions & 0 deletions

File tree

src/ThreatIntelligenceService.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class ThreatIntelligenceService extends \Google\Service
3838
const CLOUD_PLATFORM =
3939
"https://www.googleapis.com/auth/cloud-platform";
4040

41+
public $projects;
4142
public $projects_alerts;
4243
public $projects_alerts_documents;
4344
public $projects_configurations;
@@ -63,6 +64,26 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
6364
$this->version = 'v1beta';
6465
$this->serviceName = 'threatintelligence';
6566

67+
$this->projects = new ThreatIntelligenceService\Resource\Projects(
68+
$this,
69+
$this->serviceName,
70+
'projects',
71+
[
72+
'methods' => [
73+
'generateOrgProfile' => [
74+
'path' => 'v1beta/{+name}:generateOrgProfile',
75+
'httpMethod' => 'POST',
76+
'parameters' => [
77+
'name' => [
78+
'location' => 'path',
79+
'type' => 'string',
80+
'required' => true,
81+
],
82+
],
83+
],
84+
]
85+
]
86+
);
6687
$this->projects_alerts = new ThreatIntelligenceService\Resource\ProjectsAlerts(
6788
$this,
6889
$this->serviceName,

src/ThreatIntelligenceService/Alert.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ class Alert extends \Google\Collection
122122
* @var string
123123
*/
124124
public $externalId;
125+
/**
126+
* Output only. The number of findings associated with this alert.
127+
*
128+
* @var string
129+
*/
130+
public $findingCount;
125131
/**
126132
* Output only. Findings that are covered by this alert.
127133
*
@@ -315,6 +321,22 @@ public function getExternalId()
315321
{
316322
return $this->externalId;
317323
}
324+
/**
325+
* Output only. The number of findings associated with this alert.
326+
*
327+
* @param string $findingCount
328+
*/
329+
public function setFindingCount($findingCount)
330+
{
331+
$this->findingCount = $findingCount;
332+
}
333+
/**
334+
* @return string
335+
*/
336+
public function getFindingCount()
337+
{
338+
return $this->findingCount;
339+
}
318340
/**
319341
* Output only. Findings that are covered by this alert.
320342
*
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\ThreatIntelligenceService;
19+
20+
class GenerateOrgProfileConfigurationRequest extends \Google\Model
21+
{
22+
/**
23+
* Required. The display name of the organization to generate the profile for.
24+
*
25+
* @var string
26+
*/
27+
public $displayName;
28+
/**
29+
* Required. The domain of the organization to generate the profile for.
30+
*
31+
* @var string
32+
*/
33+
public $domain;
34+
35+
/**
36+
* Required. The display name of the organization to generate the profile for.
37+
*
38+
* @param string $displayName
39+
*/
40+
public function setDisplayName($displayName)
41+
{
42+
$this->displayName = $displayName;
43+
}
44+
/**
45+
* @return string
46+
*/
47+
public function getDisplayName()
48+
{
49+
return $this->displayName;
50+
}
51+
/**
52+
* Required. The domain of the organization to generate the profile for.
53+
*
54+
* @param string $domain
55+
*/
56+
public function setDomain($domain)
57+
{
58+
$this->domain = $domain;
59+
}
60+
/**
61+
* @return string
62+
*/
63+
public function getDomain()
64+
{
65+
return $this->domain;
66+
}
67+
}
68+
69+
// Adding a class alias for backwards compatibility with the previous class name.
70+
class_alias(GenerateOrgProfileConfigurationRequest::class, 'Google_Service_ThreatIntelligenceService_GenerateOrgProfileConfigurationRequest');
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\ThreatIntelligenceService;
19+
20+
class Operation extends \Google\Model
21+
{
22+
/**
23+
* If the value is `false`, it means the operation is still in progress. If
24+
* `true`, the operation is completed, and either `error` or `response` is
25+
* available.
26+
*
27+
* @var bool
28+
*/
29+
public $done;
30+
protected $errorType = Status::class;
31+
protected $errorDataType = '';
32+
/**
33+
* Service-specific metadata associated with the operation. It typically
34+
* contains progress information and common metadata such as create time. Some
35+
* services might not provide such metadata. Any method that returns a long-
36+
* running operation should document the metadata type, if any.
37+
*
38+
* @var array[]
39+
*/
40+
public $metadata;
41+
/**
42+
* The server-assigned name, which is only unique within the same service that
43+
* originally returns it. If you use the default HTTP mapping, the `name`
44+
* should be a resource name ending with `operations/{unique_id}`.
45+
*
46+
* @var string
47+
*/
48+
public $name;
49+
/**
50+
* The normal, successful response of the operation. If the original method
51+
* returns no data on success, such as `Delete`, the response is
52+
* `google.protobuf.Empty`. If the original method is standard
53+
* `Get`/`Create`/`Update`, the response should be the resource. For other
54+
* methods, the response should have the type `XxxResponse`, where `Xxx` is
55+
* the original method name. For example, if the original method name is
56+
* `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
57+
*
58+
* @var array[]
59+
*/
60+
public $response;
61+
62+
/**
63+
* If the value is `false`, it means the operation is still in progress. If
64+
* `true`, the operation is completed, and either `error` or `response` is
65+
* available.
66+
*
67+
* @param bool $done
68+
*/
69+
public function setDone($done)
70+
{
71+
$this->done = $done;
72+
}
73+
/**
74+
* @return bool
75+
*/
76+
public function getDone()
77+
{
78+
return $this->done;
79+
}
80+
/**
81+
* The error result of the operation in case of failure or cancellation.
82+
*
83+
* @param Status $error
84+
*/
85+
public function setError(Status $error)
86+
{
87+
$this->error = $error;
88+
}
89+
/**
90+
* @return Status
91+
*/
92+
public function getError()
93+
{
94+
return $this->error;
95+
}
96+
/**
97+
* Service-specific metadata associated with the operation. It typically
98+
* contains progress information and common metadata such as create time. Some
99+
* services might not provide such metadata. Any method that returns a long-
100+
* running operation should document the metadata type, if any.
101+
*
102+
* @param array[] $metadata
103+
*/
104+
public function setMetadata($metadata)
105+
{
106+
$this->metadata = $metadata;
107+
}
108+
/**
109+
* @return array[]
110+
*/
111+
public function getMetadata()
112+
{
113+
return $this->metadata;
114+
}
115+
/**
116+
* The server-assigned name, which is only unique within the same service that
117+
* originally returns it. If you use the default HTTP mapping, the `name`
118+
* should be a resource name ending with `operations/{unique_id}`.
119+
*
120+
* @param string $name
121+
*/
122+
public function setName($name)
123+
{
124+
$this->name = $name;
125+
}
126+
/**
127+
* @return string
128+
*/
129+
public function getName()
130+
{
131+
return $this->name;
132+
}
133+
/**
134+
* The normal, successful response of the operation. If the original method
135+
* returns no data on success, such as `Delete`, the response is
136+
* `google.protobuf.Empty`. If the original method is standard
137+
* `Get`/`Create`/`Update`, the response should be the resource. For other
138+
* methods, the response should have the type `XxxResponse`, where `Xxx` is
139+
* the original method name. For example, if the original method name is
140+
* `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
141+
*
142+
* @param array[] $response
143+
*/
144+
public function setResponse($response)
145+
{
146+
$this->response = $response;
147+
}
148+
/**
149+
* @return array[]
150+
*/
151+
public function getResponse()
152+
{
153+
return $this->response;
154+
}
155+
}
156+
157+
// Adding a class alias for backwards compatibility with the previous class name.
158+
class_alias(Operation::class, 'Google_Service_ThreatIntelligenceService_Operation');

src/ThreatIntelligenceService/Resource/Projects.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
namespace Google\Service\ThreatIntelligenceService\Resource;
1919

20+
use Google\Service\ThreatIntelligenceService\GenerateOrgProfileConfigurationRequest;
21+
use Google\Service\ThreatIntelligenceService\Operation;
22+
2023
/**
2124
* The "projects" collection of methods.
2225
* Typical usage is:
@@ -27,6 +30,23 @@
2730
*/
2831
class Projects extends \Google\Service\Resource
2932
{
33+
/**
34+
* Triggers the generation of a Customer Profile for a project.
35+
* (projects.generateOrgProfile)
36+
*
37+
* @param string $name Required. The name of the project to generate the profile
38+
* for. Format: projects/{project}
39+
* @param GenerateOrgProfileConfigurationRequest $postBody
40+
* @param array $optParams Optional parameters.
41+
* @return Operation
42+
* @throws \Google\Service\Exception
43+
*/
44+
public function generateOrgProfile($name, GenerateOrgProfileConfigurationRequest $postBody, $optParams = [])
45+
{
46+
$params = ['name' => $name, 'postBody' => $postBody];
47+
$params = array_merge($params, $optParams);
48+
return $this->call('generateOrgProfile', [$params], Operation::class);
49+
}
3050
}
3151

3252
// Adding a class alias for backwards compatibility with the previous class name.

0 commit comments

Comments
 (0)