Skip to content

Commit

Permalink
fix(v1beta1): proper field annotations (#95)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

This update adds resource annotations and REQUIRED annotations to ManagedIdentities v1beta1 API. The changes to the generated library will likely be breaking.

PiperOrigin-RevId: 413179905

Source-Link: googleapis/googleapis@2198f9f

Source-Link: googleapis/googleapis-gen@1e93ad8
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWU5M2FkODNkOWRkNTU0OWY2OTQxNGI0MjdlMTg5MmIyMTU5YTM1ZSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Dec 6, 2021
1 parent d52d094 commit 9b72eb2
Show file tree
Hide file tree
Showing 15 changed files with 706 additions and 161 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2021 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 @@ -11,19 +11,19 @@
// 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.managedidentities.v1beta1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/managedidentities/v1beta1/resource.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/api/client.proto";

option csharp_namespace = "Google.Cloud.ManagedIdentities.V1Beta1";
option go_package = "google.golang.org/genproto/googleapis/cloud/managedidentities/v1beta1;managedidentities";
Expand All @@ -44,6 +44,7 @@ service ManagedIdentitiesService {
post: "/v1beta1/{parent=projects/*/locations/global}/domains"
body: "domain"
};
option (google.api.method_signature) = "parent,domain_name,domain";
option (google.longrunning.operation_info) = {
response_type: "Domain"
metadata_type: "OpMetadata"
Expand All @@ -56,20 +57,23 @@ service ManagedIdentitiesService {
post: "/v1beta1/{name=projects/*/locations/global/domains/*}:resetAdminPassword"
body: "*"
};
option (google.api.method_signature) = "name";
}

// Lists domains in a project.
rpc ListDomains(ListDomainsRequest) returns (ListDomainsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/global}/domains"
};
option (google.api.method_signature) = "parent";
}

// Gets information about a domain.
rpc GetDomain(GetDomainRequest) returns (Domain) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/global/domains/*}"
};
option (google.api.method_signature) = "name";
}

// Updates the metadata and configuration of a domain.
Expand All @@ -78,6 +82,7 @@ service ManagedIdentitiesService {
patch: "/v1beta1/{domain.name=projects/*/locations/global/domains/*}"
body: "domain"
};
option (google.api.method_signature) = "domain,update_mask";
option (google.longrunning.operation_info) = {
response_type: "Domain"
metadata_type: "OpMetadata"
Expand All @@ -89,6 +94,7 @@ service ManagedIdentitiesService {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/global/domains/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "OpMetadata"
Expand All @@ -101,6 +107,7 @@ service ManagedIdentitiesService {
post: "/v1beta1/{name=projects/*/locations/global/domains/*}:attachTrust"
body: "*"
};
option (google.api.method_signature) = "name,trust";
option (google.longrunning.operation_info) = {
response_type: "Domain"
metadata_type: "OpMetadata"
Expand All @@ -113,6 +120,7 @@ service ManagedIdentitiesService {
post: "/v1beta1/{name=projects/*/locations/global/domains/*}:reconfigureTrust"
body: "*"
};
option (google.api.method_signature) = "name,target_domain_name,target_dns_ip_addresses";
option (google.longrunning.operation_info) = {
response_type: "Domain"
metadata_type: "OpMetadata"
Expand All @@ -125,6 +133,7 @@ service ManagedIdentitiesService {
post: "/v1beta1/{name=projects/*/locations/global/domains/*}:detachTrust"
body: "*"
};
option (google.api.method_signature) = "name,trust";
option (google.longrunning.operation_info) = {
response_type: "Domain"
metadata_type: "OpMetadata"
Expand All @@ -138,6 +147,7 @@ service ManagedIdentitiesService {
post: "/v1beta1/{name=projects/*/locations/global/domains/*}:validateTrust"
body: "*"
};
option (google.api.method_signature) = "name,trust";
option (google.longrunning.operation_info) = {
response_type: "Domain"
metadata_type: "OpMetadata"
Expand Down Expand Up @@ -172,32 +182,42 @@ message OpMetadata {
// Request message for
// [CreateMicrosoftAdDomain][google.cloud.managedidentities.v1beta1.CreateMicrosoftAdDomain]
message CreateMicrosoftAdDomainRequest {
// The resource project name and location using the form:
// Required. The resource project name and location using the form:
// `projects/{project_id}/locations/global`
string parent = 1;

// A domain name, e.g. mydomain.myorg.com, with the following restrictions:
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "managedidentities.googleapis.com/Domain"
}
];

// Required. A domain name, e.g. mydomain.myorg.com, with the following restrictions:
// * Must contain only lowercase letters, numbers, periods and hyphens.
// * Must start with a letter.
// * Must contain between 2-64 characters.
// * Must end with a number or a letter.
// * Must not start with period.
// * First segement length (mydomain form example above) shouldn't exceed
// * First segment length (mydomain form example above) shouldn't exceed
// 15 chars.
// * The last segment cannot be fully numeric.
// * Must be unique within the customer project.
string domain_name = 2;
string domain_name = 2 [(google.api.field_behavior) = REQUIRED];

// A Managed Identity domain resource.
Domain domain = 3;
// Required. A Managed Identity domain resource.
Domain domain = 3 [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [ResetAdminPassword][google.cloud.managedidentities.v1beta1.ResetAdminPassword]
message ResetAdminPasswordRequest {
// The domain resource name using the form:
// Required. The domain resource name using the form:
// `projects/{project_id}/locations/global/domains/{domain_name}`
string name = 1;
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "managedidentities.googleapis.com/Domain"
}
];
}

// Response message for
Expand All @@ -212,7 +232,12 @@ message ResetAdminPasswordResponse {
message ListDomainsRequest {
// Required. The resource name of the domain location using the form:
// `projects/{project_id}/locations/global`
string parent = 1;
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "managedidentities.googleapis.com/Domain"
}
];

// Optional. The maximum number of items to return.
// If not specified, a default value of 1000 will be used.
Expand Down Expand Up @@ -254,80 +279,111 @@ message ListDomainsResponse {
// Request message for
// [GetDomain][google.cloud.managedidentities.v1beta1.GetDomain]
message GetDomainRequest {
// The domain resource name using the form:
// Required. The domain resource name using the form:
// `projects/{project_id}/locations/global/domains/{domain_name}`
string name = 1;
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "managedidentities.googleapis.com/Domain"
}
];
}

// Request message for
// [UpdateDomain][google.cloud.managedidentities.v1beta1.UpdateDomain]
message UpdateDomainRequest {
// Mask of fields to update. At least one path must be supplied in this
// Required. Mask of fields to update. At least one path must be supplied in this
// field. The elements of the repeated paths field may only include
// fields from [Domain][google.cloud.managedidentities.v1beta1.Domain]:
// * `labels`
// * `locations`
// * `authorized_networks`
google.protobuf.FieldMask update_mask = 1;
// * `audit_logs_enabled`
google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];

// Domain message with updated fields. Only supported fields specified in
// Required. Domain message with updated fields. Only supported fields specified in
// update_mask are updated.
Domain domain = 2;
Domain domain = 2 [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [DeleteDomain][google.cloud.managedidentities.v1beta1.DeleteDomain]
message DeleteDomainRequest {
// The domain resource name using the form:
// Required. The domain resource name using the form:
// `projects/{project_id}/locations/global/domains/{domain_name}`
string name = 1;
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "managedidentities.googleapis.com/Domain"
}
];
}

// Request message for
// [AttachTrust][google.cloud.managedidentities.v1beta1.AttachTrust]
message AttachTrustRequest {
// The resource domain name, project name and location using the form:
// Required. The resource domain name, project name and location using the form:
// `projects/{project_id}/locations/global/domains/{domain_name}`
string name = 1;

// The domain trust resource.
Trust trust = 2;
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "managedidentities.googleapis.com/Domain"
}
];

// Required. The domain trust resource.
Trust trust = 2 [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [ReconfigureTrust][google.cloud.managedidentities.v1beta1.ReconfigureTrust]
message ReconfigureTrustRequest {
// The resource domain name, project name and location using the form:
// Required. The resource domain name, project name and location using the form:
// `projects/{project_id}/locations/global/domains/{domain_name}`
string name = 1;

// The fully-qualified target domain name which will be in trust with current
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "managedidentities.googleapis.com/Domain"
}
];

// Required. The fully-qualified target domain name which will be in trust with current
// domain.
string target_domain_name = 2;
string target_domain_name = 2 [(google.api.field_behavior) = REQUIRED];

// The target DNS server IP addresses to resolve the remote domain involved
// Required. The target DNS server IP addresses to resolve the remote domain involved
// in the trust.
repeated string target_dns_ip_addresses = 3;
repeated string target_dns_ip_addresses = 3 [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [DetachTrust][google.cloud.managedidentities.v1beta1.DetachTrust]
message DetachTrustRequest {
// The resource domain name, project name, and location using the form:
// Required. The resource domain name, project name, and location using the form:
// `projects/{project_id}/locations/global/domains/{domain_name}`
string name = 1;

// The domain trust resource to removed.
Trust trust = 2;
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "managedidentities.googleapis.com/Domain"
}
];

// Required. The domain trust resource to removed.
Trust trust = 2 [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [ValidateTrust][google.cloud.managedidentities.v1beta1.ValidateTrust]
message ValidateTrustRequest {
// The resource domain name, project name, and location using the form:
// Required. The resource domain name, project name, and location using the form:
// `projects/{project_id}/locations/global/domains/{domain_name}`
string name = 1;

// The domain trust to validate trust state for.
Trust trust = 2;
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "managedidentities.googleapis.com/Domain"
}
];

// Required. The domain trust to validate trust state for.
Trust trust = 2 [(google.api.field_behavior) = REQUIRED];
}
Loading

0 comments on commit 9b72eb2

Please sign in to comment.