Skip to content

Commit

Permalink
fix: proto files updated with proto annotations (#182)
Browse files Browse the repository at this point in the history
* [CHANGE ME] Re-generated  to pick up changes in the API or client library generator.

* fix: add missing protos

Co-authored-by: Benjamin E. Coe <bencoe@google.com>
Co-authored-by: Alexander Fenster <github@fenster.name>
  • Loading branch information
3 people committed Jan 4, 2020
1 parent b324c66 commit 9f19713
Show file tree
Hide file tree
Showing 30 changed files with 20,577 additions and 16,761 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ syntax = "proto3";

package google.cloud.securitycenter.v1;

import "google/api/annotations.proto";
import "google/api/resource.proto";
import "google/cloud/securitycenter/v1/security_marks.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
Expand Down Expand Up @@ -66,6 +66,15 @@ message Asset {

// Owners of the Google Cloud resource.
repeated string resource_owners = 5;

// The user defined display name for this resource.
string resource_display_name = 6;

// The user defined display name for the parent of this resource.
string resource_parent_display_name = 7;

// The user defined display name for the project of this resource.
string resource_project_display_name = 8;
}

// IAM Policy information associated with the GCP resource described by the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ syntax = "proto3";

package google.cloud.securitycenter.v1;

import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/securitycenter/v1/security_marks.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ syntax = "proto3";

package google.cloud.securitycenter.v1;

import "google/api/annotations.proto";
import "google/api/resource.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ syntax = "proto3";

package google.cloud.securitycenter.v1;

import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ syntax = "proto3";

package google.cloud.securitycenter.v1;

import "google/api/annotations.proto";
import "google/api/resource.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import "google/api/resource.proto";
import "google/cloud/securitycenter/v1/asset.proto";
import "google/cloud/securitycenter/v1/finding.proto";
import "google/cloud/securitycenter/v1/organization_settings.proto";
import "google/cloud/securitycenter/v1/run_asset_discovery_response.proto";
import "google/cloud/securitycenter/v1/security_marks.proto";
import "google/cloud/securitycenter/v1/source.proto";
import "google/iam/v1/iam_policy.proto";
Expand Down Expand Up @@ -345,9 +344,12 @@ message GroupAssetsRequest {
// * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
// * security_marks.marks: `=`, `:`
// * security_center_properties.resource_name: `=`, `:`
// * security_center_properties.resource_display_name: `=`, `:`
// * security_center_properties.resource_type: `=`, `:`
// * security_center_properties.resource_parent: `=`, `:`
// * security_center_properties.resource_parent_display_name: `=`, `:`
// * security_center_properties.resource_project: `=`, `:`
// * security_center_properties.resource_project_display_name: `=`, `:`
// * security_center_properties.resource_owners: `=`, `:`
//
// For example, `resource_properties.size = 100` is a valid filter string.
Expand All @@ -361,12 +363,16 @@ message GroupAssetsRequest {
// The following fields are supported when compare_duration is not set:
//
// * security_center_properties.resource_project
// * security_center_properties.resource_project_display_name
// * security_center_properties.resource_type
// * security_center_properties.resource_parent
// * security_center_properties.resource_parent_display_name
//
// The following fields are supported when compare_duration is set:
//
// * security_center_properties.resource_type
// * security_center_properties.resource_project_display_name
// * security_center_properties.resource_parent_display_name
string group_by = 3 [(google.api.field_behavior) = REQUIRED];

// When compare_duration is set, the GroupResult's "state_change" property is
Expand Down Expand Up @@ -666,9 +672,12 @@ message ListAssetsRequest {
// * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
// * security_marks.marks: `=`, `:`
// * security_center_properties.resource_name: `=`, `:`
// * security_center_properties.resource_display_name: `=`, `:`
// * security_center_properties.resource_type: `=`, `:`
// * security_center_properties.resource_parent: `=`, `:`
// * security_center_properties.resource_parent_display_name: `=`, `:`
// * security_center_properties.resource_project: `=`, `:`
// * security_center_properties.resource_project_display_name: `=`, `:`
// * security_center_properties.resource_owners: `=`, `:`
//
// For example, `resource_properties.size = 100` is a valid filter string.
Expand All @@ -689,8 +698,11 @@ message ListAssetsRequest {
// resource_properties
// security_marks.marks
// security_center_properties.resource_name
// security_center_properties.resource_display_name
// security_center_properties.resource_parent
// security_center_properties.resource_parent_display_name
// security_center_properties.resource_project
// security_center_properties.resource_project_display_name
// security_center_properties.resource_type
string order_by = 3;

Expand Down Expand Up @@ -914,6 +926,26 @@ message ListFindingsRequest {
message ListFindingsResponse {
// Result containing the Finding and its StateChange.
message ListFindingsResult {
// Information related to the Google Cloud Platform (GCP) resource that is
// associated with this finding.
message Resource {
// The full resource name of the resource. See:
// https://cloud.google.com/apis/design/resource_names#full_resource_name
string name = 1;

// The full resource name of project that the resource belongs to.
string project_name = 2;

// The human readable name of project that the resource belongs to.
string project_display_name = 3;

// The full resource name of resource's parent.
string parent_name = 4;

// The human readable name of resource's parent.
string parent_display_name = 5;
}

// The change in state of the finding.
//
// When querying across two points in time this describes
Expand Down Expand Up @@ -947,6 +979,9 @@ message ListFindingsResponse {

// State change of the finding between the points in time.
StateChange state_change = 2;

// Output only. Resource that is associated with this finding.
Resource resource = 3;
}

// Findings matching the list request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ syntax = "proto3";

package google.cloud.securitycenter.v1;

import "google/api/annotations.proto";
import "google/api/resource.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC.
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,10 +17,11 @@ syntax = "proto3";

package google.cloud.securitycenter.v1beta1;

import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/cloud/securitycenter/v1beta1/security_marks.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter";
option java_multiple_files = true;
Expand All @@ -36,10 +37,10 @@ message Asset {
// Cloud SCC managed properties. These properties are managed by Cloud SCC and
// cannot be modified by the user.
message SecurityCenterProperties {
// The full resource name of the GCP resource this asset
// Immutable. The full resource name of the GCP resource this asset
// represents. This field is immutable after create time. See:
// https://cloud.google.com/apis/design/resource_names#full_resource_name
string resource_name = 1;
string resource_name = 1 [(google.api.field_behavior) = IMMUTABLE];

// The type of the GCP resource. Examples include: APPLICATION,
// PROJECT, and ORGANIZATION. This is a case insensitive field defined by
Expand All @@ -62,7 +63,7 @@ message Asset {
// The relative resource name of this asset. See:
// https://cloud.google.com/apis/design/resource_names#relative_resource_name
// Example:
// "organizations/123/assets/456".
// "organizations/{organization_id}/assets/{asset_id}".
string name = 1;

// Cloud SCC managed properties. These properties are managed by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC.
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,10 +17,12 @@ syntax = "proto3";

package google.cloud.securitycenter.v1beta1;

import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/securitycenter/v1beta1/security_marks.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter";
option java_multiple_files = true;
Expand All @@ -33,6 +35,11 @@ option java_package = "com.google.cloud.securitycenter.v1beta1";
// policy testing, and enforcement. For example, an XSS vulnerability in an
// App Engine application is a finding.
message Finding {
option (google.api.resource) = {
type: "securitycenter.googleapis.com/Finding"
pattern: "organizations/{organization}/sources/{source}/findings/{finding}"
};

// The state of the finding.
enum State {
// Unspecified state.
Expand All @@ -49,19 +56,21 @@ message Finding {
// The relative resource name of this finding. See:
// https://cloud.google.com/apis/design/resource_names#relative_resource_name
// Example:
// "organizations/123/sources/456/findings/789"
// "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
string name = 1;

// The relative resource name of the source the finding belongs to. See:
// Immutable. The relative resource name of the source the finding belongs to. See:
// https://cloud.google.com/apis/design/resource_names#relative_resource_name
// This field is immutable after creation time.
// For example:
// "organizations/123/sources/456"
string parent = 2;
// "organizations/{organization_id}/sources/{source_id}"
string parent = 2 [(google.api.field_behavior) = IMMUTABLE];

// The full resource name of the Google Cloud Platform (GCP) resource this
// finding is for. See:
// For findings on Google Cloud Platform (GCP) resources, the full resource
// name of the GCP resource this finding is for. See:
// https://cloud.google.com/apis/design/resource_names#full_resource_name
// When the finding is for a non-GCP resource, the resourceName can be a
// customer or partner defined string.
// This field is immutable after creation time.
string resource_name = 3;

Expand All @@ -87,11 +96,11 @@ message Finding {
// Output only. User specified security marks. These marks are entirely
// managed by the user and come from the SecurityMarks resource that belongs
// to the finding.
SecurityMarks security_marks = 8;
SecurityMarks security_marks = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

// The time at which the event took place. For example, if the finding
// represents an open firewall it would capture the time the open firewall was
// detected.
// represents an open firewall it would capture the time the detector believes
// the firewall became open. The accuracy is determined by the detector.
google.protobuf.Timestamp event_time = 9;

// The time at which the finding was created in Cloud SCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC.
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@ syntax = "proto3";

package google.cloud.securitycenter.v1beta1;

import "google/api/resource.proto";
import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter";
Expand All @@ -26,6 +27,11 @@ option java_package = "com.google.cloud.securitycenter.v1beta1";
// User specified settings that are attached to the Cloud Security Command
// Center (Cloud SCC) organization.
message OrganizationSettings {
option (google.api.resource) = {
type: "securitycenter.googleapis.com/OrganizationSettings"
pattern: "organizations/{organization}/organizationSettings"
};

// The configuration used for Asset Discovery runs.
message AssetDiscoveryConfig {
// The mode of inclusion when running Asset Discovery.
Expand Down Expand Up @@ -60,7 +66,7 @@ message OrganizationSettings {
// The relative resource name of the settings. See:
// https://cloud.google.com/apis/design/resource_names#relative_resource_name
// Example:
// "organizations/123/organizationSettings".
// "organizations/{organization_id}/organizationSettings".
string name = 1;

// A flag that indicates if Asset Discovery should be enabled. If the flag is
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

package google.cloud.securitycenter.v1beta1;

import "google/protobuf/duration.proto";
import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1;securitycenter";
option java_multiple_files = true;
option java_package = "com.google.cloud.securitycenter.v1beta1";

// Response of asset discovery run
message RunAssetDiscoveryResponse {
// The state of an asset discovery run.
enum State {
// Asset discovery run state was unspecified.
STATE_UNSPECIFIED = 0;

// Asset discovery run completed successfully.
COMPLETED = 1;

// Asset discovery run was cancelled with tasks still pending, as another
// run for the same organization was started with a higher priority.
SUPERSEDED = 2;

// Asset discovery run was killed and terminated.
TERMINATED = 3;
}

// The state of an asset discovery run.
State state = 1;

// The duration between asset discovery run start and end
google.protobuf.Duration duration = 2;
}
Loading

0 comments on commit 9f19713

Please sign in to comment.