Skip to content

Commit

Permalink
chore: updated proto annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored Feb 29, 2020
1 parent 8ef8160 commit 0fe9f5d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,15 @@ service KeyManagementService {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}"
};
option (google.api.method_signature) = "name";
}

// Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
rpc GetCryptoKeyVersion(GetCryptoKeyVersionRequest) returns (CryptoKeyVersion) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}"
};
option (google.api.method_signature) = "name";
}

// Returns the public key for the given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The
Expand All @@ -112,13 +114,15 @@ service KeyManagementService {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey"
};
option (google.api.method_signature) = "name";
}

// Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].
rpc GetImportJob(GetImportJobRequest) returns (ImportJob) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/keyRings/*/importJobs/*}"
};
option (google.api.method_signature) = "name";
}

// Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.
Expand Down Expand Up @@ -371,7 +375,7 @@ message ListCryptoKeyVersionsRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudkms.googleapis.com/KeyRing"
type: "cloudkms.googleapis.com/CryptoKey"
}
];

Expand Down Expand Up @@ -678,9 +682,7 @@ message CreateImportJobRequest {
// Request message for [KeyManagementService.UpdateCryptoKey][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKey].
message UpdateCryptoKeyRequest {
// Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values.
CryptoKey crypto_key = 1 [
(google.api.field_behavior) = REQUIRED
];
CryptoKey crypto_key = 1 [(google.api.field_behavior) = REQUIRED];

// Required. List of fields to be updated in this request.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
Expand All @@ -689,9 +691,7 @@ message UpdateCryptoKeyRequest {
// Request message for [KeyManagementService.UpdateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersion].
message UpdateCryptoKeyVersionRequest {
// Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with updated values.
CryptoKeyVersion crypto_key_version = 1 [
(google.api.field_behavior) = REQUIRED
];
CryptoKeyVersion crypto_key_version = 1 [(google.api.field_behavior) = REQUIRED];

// Required. List of fields to be updated in this request.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
Expand All @@ -707,7 +707,7 @@ message EncryptRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudkms.googleapis.com/CryptoKey"
type: "*"
}
];

Expand Down
16 changes: 10 additions & 6 deletions packages/google-cloud-kms/protos/protos.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,32 @@
"requestType": "GetCryptoKeyRequest",
"responseType": "CryptoKey",
"options": {
"(google.api.http).get": "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}"
"(google.api.http).get": "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}",
"(google.api.method_signature)": "name"
}
},
"GetCryptoKeyVersion": {
"requestType": "GetCryptoKeyVersionRequest",
"responseType": "CryptoKeyVersion",
"options": {
"(google.api.http).get": "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}"
"(google.api.http).get": "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}",
"(google.api.method_signature)": "name"
}
},
"GetPublicKey": {
"requestType": "GetPublicKeyRequest",
"responseType": "PublicKey",
"options": {
"(google.api.http).get": "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey"
"(google.api.http).get": "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey",
"(google.api.method_signature)": "name"
}
},
"GetImportJob": {
"requestType": "GetImportJobRequest",
"responseType": "ImportJob",
"options": {
"(google.api.http).get": "/v1/{name=projects/*/locations/*/keyRings/*/importJobs/*}"
"(google.api.http).get": "/v1/{name=projects/*/locations/*/keyRings/*/importJobs/*}",
"(google.api.method_signature)": "name"
}
},
"CreateKeyRing": {
Expand Down Expand Up @@ -309,7 +313,7 @@
"id": 1,
"options": {
"(google.api.field_behavior)": "REQUIRED",
"(google.api.resource_reference).type": "cloudkms.googleapis.com/KeyRing"
"(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey"
}
},
"pageSize": {
Expand Down Expand Up @@ -695,7 +699,7 @@
"id": 1,
"options": {
"(google.api.field_behavior)": "REQUIRED",
"(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey"
"(google.api.resource_reference).type": "*"
}
},
"plaintext": {
Expand Down
Loading

0 comments on commit 0fe9f5d

Please sign in to comment.