Skip to content

Commit

Permalink
docs: various doc changes in protos and generated source (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jan 14, 2019
1 parent a5f8581 commit 572482d
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/
option java_multiple_files = true;
option java_package = "com.google.cloud.securitycenter.v1beta1";


// Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud
// Platform (GCP) resource.
//
// The Asset is a Cloud SCC resource that captures information about a single GCP
// resource. All modifications to an Asset are only within the context of Cloud
// SCC and don't affect the referenced GCP resource.
// The Asset is a Cloud SCC resource that captures information about a single
// GCP resource. All modifications to an Asset are only within the context of
// Cloud SCC and don't affect the referenced GCP resource.
message Asset {
// Cloud SCC managed properties. These properties are managed by Cloud SCC and
// cannot be modified by the user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/
option java_multiple_files = true;
option java_package = "com.google.cloud.securitycenter.v1beta1";


// Cloud Security Command Center (Cloud SCC) finding.
//
// A finding is a record of assessment data (security, risk, health or privacy)
Expand Down Expand Up @@ -69,7 +68,7 @@ message Finding {
// The state of the finding.
State state = 4;

// The additional taxonomy group within findings from a give source.
// The additional taxonomy group within findings from a given source.
// This field is immutable after creation time.
// Example: "XSS_FLASH_INJECTION"
string category = 5;
Expand All @@ -80,7 +79,9 @@ message Finding {
string external_uri = 6;

// Source specific properties. These properties are managed by the source
// that writes the finding.
// that writes the finding. The key names in the source_properties map must be
// between 1 and 255 characters, and must start with a letter and contain
// alphanumeric characters or underscores only.
map<string, google.protobuf.Value> source_properties = 7;

// Output only. User specified security marks. These marks are entirely
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/
option java_multiple_files = true;
option java_package = "com.google.cloud.securitycenter.v1beta1";


// V1 Beta APIs for Security Center service.
service SecurityCenter {
// Creates a source.
Expand All @@ -57,15 +56,17 @@ service SecurityCenter {
}

// Gets the access control policy on the specified Source.
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v1beta1/{resource=organizations/*/sources/*}:getIamPolicy"
body: "*"
};
}

// Gets the settings for an organization.
rpc GetOrganizationSettings(GetOrganizationSettingsRequest) returns (OrganizationSettings) {
rpc GetOrganizationSettings(GetOrganizationSettingsRequest)
returns (OrganizationSettings) {
option (google.api.http) = {
get: "/v1beta1/{name=organizations/*/organizationSettings}"
};
Expand Down Expand Up @@ -129,7 +130,8 @@ service SecurityCenter {
// This API can only be called with limited frequency for an organization. If
// it is called too frequently the caller will receive a TOO_MANY_REQUESTS
// error.
rpc RunAssetDiscovery(RunAssetDiscoveryRequest) returns (google.longrunning.Operation) {
rpc RunAssetDiscovery(RunAssetDiscoveryRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{parent=organizations/*}/assets:runDiscovery"
body: "*"
Expand All @@ -145,15 +147,17 @@ service SecurityCenter {
}

// Sets the access control policy on the specified Source.
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v1beta1/{resource=organizations/*/sources/*}:setIamPolicy"
body: "*"
};
}

// Returns the permissions that a caller has on the specified source.
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
returns (google.iam.v1.TestIamPermissionsResponse) {
option (google.api.http) = {
post: "/v1beta1/{resource=organizations/*/sources/*}:testIamPermissions"
body: "*"
Expand All @@ -170,7 +174,8 @@ service SecurityCenter {
}

// Updates an organization's settings.
rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest) returns (OrganizationSettings) {
rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest)
returns (OrganizationSettings) {
option (google.api.http) = {
patch: "/v1beta1/{organization_settings.name=organizations/*/organizationSettings}"
body: "organization_settings"
Expand Down Expand Up @@ -714,8 +719,8 @@ message UpdateFindingRequest {
// characters in length.
Finding finding = 1;

// The FieldMask to use when updating the finding resource. This field is
// ignored if the finding does not already exist and the finding is created.
// The FieldMask to use when updating the finding resource. This field should
// not be specified when creating a finding.
google.protobuf.FieldMask update_mask = 2;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/
option java_multiple_files = true;
option java_package = "com.google.cloud.securitycenter.v1beta1";


// Cloud Security Command Center's (Cloud SCC) finding source. A finding source
// is an entity or a mechanism that can produce a finding. A source is like a
// container of findings that come from the same scanner, logger, monitor, etc.
Expand All @@ -39,8 +38,8 @@ message Source {
// two sources with the same parent can't share the same display name.
// The display name must start and end with a letter or digit, may contain
// letters, digits, spaces, hyphens, and underscores, and can be no longer
// than 30 characters. This is captured by the regular expression:
// [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.
// than 32 characters. This is captured by the regular expression:
// [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,30}[\p{L}\p{N}])?.
string display_name = 2;

// The description of the source (max of 1024 characters).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
* Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud
* Platform (GCP) resource.
*
* The Asset is a Cloud SCC resource that captures information about a single GCP
* resource. All modifications to an Asset are only within the context of Cloud
* SCC and don't affect the referenced GCP resource.
* The Asset is a Cloud SCC resource that captures information about a single
* GCP resource. All modifications to an Asset are only within the context of
* Cloud SCC and don't affect the referenced GCP resource.
*
* @property {string} name
* The relative resource name of this asset. See:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
* The number should be among the values of [State]{@link google.cloud.securitycenter.v1beta1.State}
*
* @property {string} category
* The additional taxonomy group within findings from a give source.
* The additional taxonomy group within findings from a given source.
* This field is immutable after creation time.
* Example: "XSS_FLASH_INJECTION"
*
Expand All @@ -59,7 +59,9 @@
*
* @property {Object.<string, Object>} sourceProperties
* Source specific properties. These properties are managed by the source
* that writes the finding.
* that writes the finding. The key names in the source_properties map must be
* between 1 and 255 characters, and must start with a letter and contain
* alphanumeric characters or underscores only.
*
* @property {Object} securityMarks
* Output only. User specified security marks. These marks are entirely
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,8 @@ const RunAssetDiscoveryRequest = {
* This object should have the same structure as [Finding]{@link google.cloud.securitycenter.v1beta1.Finding}
*
* @property {Object} updateMask
* The FieldMask to use when updating the finding resource. This field is
* ignored if the finding does not already exist and the finding is created.
* The FieldMask to use when updating the finding resource. This field should
* not be specified when creating a finding.
*
* This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask}
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
* two sources with the same parent can't share the same display name.
* The display name must start and end with a letter or digit, may contain
* letters, digits, spaces, hyphens, and underscores, and can be no longer
* than 30 characters. This is captured by the regular expression:
* [\p{L}\p{N}](https://cloud.google.com{\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.
* than 32 characters. This is captured by the regular expression:
* [\p{L}\p{N}](https://cloud.google.com{\p{L}\p{N}_- ]{0,30}[\p{L}\p{N}])?.
*
* @property {string} description
* The description of the source (max of 1024 characters).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2130,8 +2130,8 @@ class SecurityCenterClient {
*
* This object should have the same structure as [Finding]{@link google.cloud.securitycenter.v1beta1.Finding}
* @param {Object} [request.updateMask]
* The FieldMask to use when updating the finding resource. This field is
* ignored if the finding does not already exist and the finding is created.
* The FieldMask to use when updating the finding resource. This field should
* not be specified when creating a finding.
*
* This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask}
* @param {Object} [options]
Expand Down
10 changes: 5 additions & 5 deletions packages/google-cloud-securitycenter/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-01-04T12:09:24.971220Z",
"updateTime": "2019-01-09T12:20:11.411487Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.16.4",
"dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857"
"version": "0.16.5",
"dockerImage": "googleapis/artman@sha256:5a96c2c5c6f9570cc9556b63dc9ce1838777fd9166b5b64e43ad8e0ecee2fe2c"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "4930597beb4d26be020513af985506b39d4b73cd",
"internalRef": "227765328"
"sha": "659d66ec24bf40b35a41a0b79218d96ba3add3d3",
"internalRef": "228437827"
}
},
{
Expand Down

0 comments on commit 572482d

Please sign in to comment.