// Copyright 2026 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.dataplex.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/field_info.proto";
import "google/api/resource.proto";
import "google/cloud/dataplex/v1/service.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";

option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb";
option java_multiple_files = true;
option java_outer_classname = "BusinessGlossaryProto";
option java_package = "com.google.cloud.dataplex.v1";

// BusinessGlossaryService provides APIs for managing business glossary
// resources for enterprise customers.
// The resources currently supported in Business Glossary are:
// 1. Glossary
// 2. GlossaryCategory
// 3. GlossaryTerm
service BusinessGlossaryService {
  option (google.api.default_host) = "dataplex.googleapis.com";
  option (google.api.oauth_scopes) =
      "https://www.googleapis.com/auth/cloud-platform,"
      "https://www.googleapis.com/auth/cloud-platform.read-only,"
      "https://www.googleapis.com/auth/dataplex.read-write,"
      "https://www.googleapis.com/auth/dataplex.readonly";

  // Creates a new Glossary resource.
  rpc CreateGlossary(CreateGlossaryRequest)
      returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=projects/*/locations/*}/glossaries"
      body: "glossary"
    };
    option (google.api.method_signature) = "parent,glossary,glossary_id";
    option (google.longrunning.operation_info) = {
      response_type: "Glossary"
      metadata_type: "OperationMetadata"
    };
  }

  // Updates a Glossary resource.
  rpc UpdateGlossary(UpdateGlossaryRequest)
      returns (google.longrunning.Operation) {
    option (google.api.http) = {
      patch: "/v1/{glossary.name=projects/*/locations/*/glossaries/*}"
      body: "glossary"
    };
    option (google.api.method_signature) = "glossary,update_mask";
    option (google.longrunning.operation_info) = {
      response_type: "Glossary"
      metadata_type: "OperationMetadata"
    };
  }

  // Deletes a Glossary resource. All the categories and terms within the
  // Glossary must be deleted before the Glossary can be deleted.
  rpc DeleteGlossary(DeleteGlossaryRequest)
      returns (google.longrunning.Operation) {
    option (google.api.http) = {
      delete: "/v1/{name=projects/*/locations/*/glossaries/*}"
    };
    option (google.api.method_signature) = "name";
    option (google.longrunning.operation_info) = {
      response_type: "google.protobuf.Empty"
      metadata_type: "OperationMetadata"
    };
  }

  // Gets a Glossary resource.
  rpc GetGlossary(GetGlossaryRequest) returns (Glossary) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/glossaries/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists Glossary resources in a project and location.
  rpc ListGlossaries(ListGlossariesRequest) returns (ListGlossariesResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*}/glossaries"
    };
    option (google.api.method_signature) = "parent";
  }

  // Creates a new GlossaryCategory resource.
  rpc CreateGlossaryCategory(CreateGlossaryCategoryRequest)
      returns (GlossaryCategory) {
    option (google.api.http) = {
      post: "/v1/{parent=projects/*/locations/*/glossaries/*}/categories"
      body: "category"
    };
    option (google.api.method_signature) = "parent,category,category_id";
  }

  // Updates a GlossaryCategory resource.
  rpc UpdateGlossaryCategory(UpdateGlossaryCategoryRequest)
      returns (GlossaryCategory) {
    option (google.api.http) = {
      patch: "/v1/{category.name=projects/*/locations/*/glossaries/*/categories/*}"
      body: "category"
    };
    option (google.api.method_signature) = "category,update_mask";
  }

  // Deletes a GlossaryCategory resource. All the GlossaryCategories and
  // GlossaryTerms nested directly under the specified GlossaryCategory will be
  // moved one level up to the parent in the hierarchy.
  rpc DeleteGlossaryCategory(DeleteGlossaryCategoryRequest)
      returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1/{name=projects/*/locations/*/glossaries/*/categories/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Gets a GlossaryCategory resource.
  rpc GetGlossaryCategory(GetGlossaryCategoryRequest)
      returns (GlossaryCategory) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/glossaries/*/categories/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists GlossaryCategory resources in a Glossary.
  rpc ListGlossaryCategories(ListGlossaryCategoriesRequest)
      returns (ListGlossaryCategoriesResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*/glossaries/*}/categories"
    };
    option (google.api.method_signature) = "parent";
  }

  // Creates a new GlossaryTerm resource.
  rpc CreateGlossaryTerm(CreateGlossaryTermRequest) returns (GlossaryTerm) {
    option (google.api.http) = {
      post: "/v1/{parent=projects/*/locations/*/glossaries/*}/terms"
      body: "term"
    };
    option (google.api.method_signature) = "parent,term,term_id";
  }

  // Updates a GlossaryTerm resource.
  rpc UpdateGlossaryTerm(UpdateGlossaryTermRequest) returns (GlossaryTerm) {
    option (google.api.http) = {
      patch: "/v1/{term.name=projects/*/locations/*/glossaries/*/terms/*}"
      body: "term"
    };
    option (google.api.method_signature) = "term,update_mask";
  }

  // Deletes a GlossaryTerm resource.
  rpc DeleteGlossaryTerm(DeleteGlossaryTermRequest)
      returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1/{name=projects/*/locations/*/glossaries/*/terms/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Gets a GlossaryTerm resource.
  rpc GetGlossaryTerm(GetGlossaryTermRequest) returns (GlossaryTerm) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/glossaries/*/terms/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists GlossaryTerm resources in a Glossary.
  rpc ListGlossaryTerms(ListGlossaryTermsRequest)
      returns (ListGlossaryTermsResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*/glossaries/*}/terms"
    };
    option (google.api.method_signature) = "parent";
  }
}

// A Glossary represents a collection of GlossaryCategories and GlossaryTerms
// defined by the user. Glossary is a top level resource and is the Google Cloud
// parent resource of all the GlossaryCategories and GlossaryTerms within it.
message Glossary {
  option (google.api.resource) = {
    type: "dataplex.googleapis.com/Glossary"
    pattern: "projects/{project}/locations/{location}/glossaries/{glossary}"
    plural: "glossaries"
    singular: "glossary"
  };

  // Output only. Identifier. The resource name of the Glossary.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  string name = 1 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.field_behavior) = IDENTIFIER
  ];

  // Output only. System generated unique id for the Glossary. This ID will be
  // different if the Glossary is deleted and re-created with the
  // same name.
  string uid = 2 [
    (google.api.field_info).format = UUID4,
    (google.api.field_behavior) = OUTPUT_ONLY
  ];

  // Optional. User friendly display name of the Glossary. This is user-mutable.
  // This will be same as the GlossaryId, if not specified.
  string display_name = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The user-mutable description of the Glossary.
  string description = 4 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The time at which the Glossary was created.
  google.protobuf.Timestamp create_time = 5
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The time at which the Glossary was last updated.
  google.protobuf.Timestamp update_time = 6
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. User-defined labels for the Glossary.
  map<string, string> labels = 7 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The number of GlossaryTerms in the Glossary.
  int32 term_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The number of GlossaryCategories in the Glossary.
  int32 category_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. Needed for resource freshness validation.
  // This checksum is computed by the server based on the value of other
  // fields, and may be sent on update and delete requests to ensure the
  // client has an up-to-date value before proceeding.
  string etag = 10 [(google.api.field_behavior) = OPTIONAL];
}

// A GlossaryCategory represents a collection of GlossaryCategories and
// GlossaryTerms within a Glossary that are related to each other.
message GlossaryCategory {
  option (google.api.resource) = {
    type: "dataplex.googleapis.com/GlossaryCategory"
    pattern: "projects/{project}/locations/{location}/glossaries/{glossary}/categories/{glossary_category}"
    plural: "categories"
    singular: "category"
  };

  // Output only. Identifier. The resource name of the GlossaryCategory.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
  string name = 1 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.field_behavior) = IDENTIFIER
  ];

  // Output only. System generated unique id for the GlossaryCategory. This ID
  // will be different if the GlossaryCategory is deleted and re-created with
  // the same name.
  string uid = 2 [
    (google.api.field_info).format = UUID4,
    (google.api.field_behavior) = OUTPUT_ONLY
  ];

  // Optional. User friendly display name of the GlossaryCategory. This is
  // user-mutable. This will be same as the GlossaryCategoryId, if not
  // specified.
  string display_name = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The user-mutable description of the GlossaryCategory.
  string description = 4 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The time at which the GlossaryCategory was created.
  google.protobuf.Timestamp create_time = 5
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The time at which the GlossaryCategory was last updated.
  google.protobuf.Timestamp update_time = 6
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. User-defined labels for the GlossaryCategory.
  map<string, string> labels = 7 [(google.api.field_behavior) = OPTIONAL];

  // Required. The immediate parent of the GlossaryCategory in the
  // resource-hierarchy. It can either be a Glossary or a GlossaryCategory.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  // OR
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
  string parent = 8 [(google.api.field_behavior) = REQUIRED];
}

// GlossaryTerms are the core of Glossary.
// A GlossaryTerm holds a rich text description that can be attached to Entries
// or specific columns to enrich them.
message GlossaryTerm {
  option (google.api.resource) = {
    type: "dataplex.googleapis.com/GlossaryTerm"
    pattern: "projects/{project}/locations/{location}/glossaries/{glossary}/terms/{glossary_term}"
    plural: "terms"
    singular: "term"
  };

  // Output only. Identifier. The resource name of the GlossaryTerm.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
  string name = 1 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.field_behavior) = IDENTIFIER
  ];

  // Output only. System generated unique id for the GlossaryTerm. This ID will
  // be different if the GlossaryTerm is deleted and re-created with the same
  // name.
  string uid = 2 [
    (google.api.field_info).format = UUID4,
    (google.api.field_behavior) = OUTPUT_ONLY
  ];

  // Optional. User friendly display name of the GlossaryTerm. This is
  // user-mutable. This will be same as the GlossaryTermId, if not specified.
  string display_name = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The user-mutable description of the GlossaryTerm.
  string description = 4 [(google.api.field_behavior) = OPTIONAL];

  // Output only. The time at which the GlossaryTerm was created.
  google.protobuf.Timestamp create_time = 5
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The time at which the GlossaryTerm was last updated.
  google.protobuf.Timestamp update_time = 6
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. User-defined labels for the GlossaryTerm.
  map<string, string> labels = 7 [(google.api.field_behavior) = OPTIONAL];

  // Required. The immediate parent of the GlossaryTerm in the
  // resource-hierarchy. It can either be a Glossary or a GlossaryCategory.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  // OR
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
  string parent = 8 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/Glossary"
    }
  ];
}

// Create Glossary Request
message CreateGlossaryRequest {
  // Required. The parent resource where this Glossary will be created.
  // Format: projects/{project_id_or_number}/locations/{location_id}
  // where `location_id` refers to a Google Cloud region.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "locations.googleapis.com/Location"
    }
  ];

  // Required. Glossary ID: Glossary identifier.
  string glossary_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The Glossary to create.
  Glossary glossary = 3 [(google.api.field_behavior) = REQUIRED];

  // Optional. Validates the request without actually creating the Glossary.
  // Default: false.
  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
}

// Update Glossary Request
message UpdateGlossaryRequest {
  // Required. The Glossary to update.
  // The Glossary's `name` field is used to identify the Glossary to update.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  Glossary glossary = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. The list of fields to update.
  google.protobuf.FieldMask update_mask = 2
      [(google.api.field_behavior) = REQUIRED];

  // Optional. Validates the request without actually updating the Glossary.
  // Default: false.
  bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Delete Glossary Request
message DeleteGlossaryRequest {
  // Required. The name of the Glossary to delete.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/Glossary"
    }
  ];

  // Optional. The etag of the Glossary.
  // If this is provided, it must match the server's etag.
  // If the etag is provided and does not match the server-computed etag,
  // the request must fail with a ABORTED error code.
  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Get Glossary Request
message GetGlossaryRequest {
  // Required. The name of the Glossary to retrieve.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/Glossary"
    }
  ];
}

// List Glossaries Request
message ListGlossariesRequest {
  // Required. The parent, which has this collection of Glossaries.
  // Format: projects/{project_id_or_number}/locations/{location_id}
  // where `location_id` refers to a Google Cloud region.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "locations.googleapis.com/Location"
    }
  ];

  // Optional. The maximum number of Glossaries to return. The service may
  // return fewer than this value. If unspecified, at most 50 Glossaries will be
  // returned. The maximum value is 1000; values above 1000 will be coerced to
  // 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous `ListGlossaries` call.
  // Provide this to retrieve the subsequent page.
  // When paginating, all other parameters provided to `ListGlossaries` must
  // match the call that provided the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter expression that filters Glossaries listed in the response.
  // Filters on proto fields of Glossary are supported.
  // Examples of using a filter are:
  //   - `display_name="my-glossary"`
  //   - `categoryCount=1`
  //   - `termCount=0`
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Order by expression that orders Glossaries listed in the
  // response. Order by fields are: `name` or `create_time` for the result. If
  // not specified, the ordering is undefined.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// List Glossaries Response
message ListGlossariesResponse {
  // Lists the Glossaries in the specified parent.
  repeated Glossary glossaries = 1;

  // A token, which can be sent as `page_token` to retrieve the next page.
  // If this field is omitted, there are no subsequent pages.
  string next_page_token = 2;

  // Locations that the service couldn't reach.
  repeated string unreachable_locations = 3;
}

// Creates a new GlossaryCategory under the specified Glossary.
message CreateGlossaryCategoryRequest {
  // Required. The parent resource where this GlossaryCategory will be created.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  // where `locationId` refers to a Google Cloud region.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/Glossary"
    }
  ];

  // Required. GlossaryCategory identifier.
  string category_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The GlossaryCategory to create.
  GlossaryCategory category = 3 [(google.api.field_behavior) = REQUIRED];
}

// Update GlossaryCategory Request
message UpdateGlossaryCategoryRequest {
  // Required. The GlossaryCategory to update.
  // The GlossaryCategory's `name` field is used to identify the
  // GlossaryCategory to update. Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
  GlossaryCategory category = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. The list of fields to update.
  google.protobuf.FieldMask update_mask = 2
      [(google.api.field_behavior) = REQUIRED];
}

// Delete GlossaryCategory Request
message DeleteGlossaryCategoryRequest {
  // Required. The name of the GlossaryCategory to delete.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/GlossaryCategory"
    }
  ];
}

// Get GlossaryCategory Request
message GetGlossaryCategoryRequest {
  // Required. The name of the GlossaryCategory to retrieve.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/GlossaryCategory"
    }
  ];
}

// List GlossaryCategories Request
message ListGlossaryCategoriesRequest {
  // Required. The parent, which has this collection of GlossaryCategories.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  // Location is the Google Cloud region.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/Glossary"
    }
  ];

  // Optional. The maximum number of GlossaryCategories to return. The service
  // may return fewer than this value. If unspecified, at most 50
  // GlossaryCategories will be returned. The maximum value is 1000; values
  // above 1000 will be coerced to 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous `ListGlossaryCategories`
  // call. Provide this to retrieve the subsequent page. When paginating, all
  // other parameters provided to `ListGlossaryCategories` must match the call
  // that provided the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter expression that filters GlossaryCategories listed in the
  // response. Filters are supported on the following fields:
  //   - immediate_parent
  //
  // Examples of using a filter are:
  //   -
  //   `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"`
  //   -
  //   `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"`
  //
  // This will only return the GlossaryCategories that are directly nested
  // under the specified parent.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Order by expression that orders GlossaryCategories listed in the
  // response. Order by fields are: `name` or `create_time` for the result. If
  // not specified, the ordering is undefined.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// List GlossaryCategories Response
message ListGlossaryCategoriesResponse {
  // Lists the GlossaryCategories in the specified parent.
  repeated GlossaryCategory categories = 1;

  // A token, which can be sent as `page_token` to retrieve the next page.
  // If this field is omitted, there are no subsequent pages.
  string next_page_token = 2;

  // Locations that the service couldn't reach.
  repeated string unreachable_locations = 3;
}

// Creates a new GlossaryTerm under the specified Glossary.
message CreateGlossaryTermRequest {
  // Required. The parent resource where the GlossaryTerm will be created.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  // where `location_id` refers to a Google Cloud region.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/Glossary"
    }
  ];

  // Required. GlossaryTerm identifier.
  string term_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The GlossaryTerm to create.
  GlossaryTerm term = 3 [(google.api.field_behavior) = REQUIRED];
}

// Update GlossaryTerm Request
message UpdateGlossaryTermRequest {
  // Required. The GlossaryTerm to update.
  // The GlossaryTerm's `name` field is used to identify the GlossaryTerm to
  // update. Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
  GlossaryTerm term = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. The list of fields to update.
  google.protobuf.FieldMask update_mask = 2
      [(google.api.field_behavior) = REQUIRED];
}

// Delete GlossaryTerm Request
message DeleteGlossaryTermRequest {
  // Required. The name of the GlossaryTerm to delete.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/GlossaryTerm"
    }
  ];
}

// Get GlossaryTerm Request
message GetGlossaryTermRequest {
  // Required. The name of the GlossaryTerm to retrieve.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/GlossaryTerm"
    }
  ];
}

// List GlossaryTerms Request
message ListGlossaryTermsRequest {
  // Required. The parent, which has this collection of GlossaryTerms.
  // Format:
  // projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  // where `location_id` refers to a Google Cloud region.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "dataplex.googleapis.com/Glossary"
    }
  ];

  // Optional. The maximum number of GlossaryTerms to return. The service may
  // return fewer than this value. If unspecified, at most 50 GlossaryTerms will
  // be returned. The maximum value is 1000; values above 1000 will be coerced
  // to 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous `ListGlossaryTerms` call.
  // Provide this to retrieve the subsequent page.
  // When paginating, all other parameters provided to `ListGlossaryTerms` must
  // match the call that provided the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter expression that filters GlossaryTerms listed in the
  // response. Filters are supported on the following fields:
  //   - immediate_parent
  //
  // Examples of using a filter are:
  //   -
  //   `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"`
  //   -
  //   `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"`
  //
  // This will only return the GlossaryTerms that are directly nested under the
  // specified parent.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Order by expression that orders GlossaryTerms listed in the
  // response. Order by fields are: `name` or `create_time` for the result. If
  // not specified, the ordering is undefined.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// List GlossaryTerms Response
message ListGlossaryTermsResponse {
  // Lists the GlossaryTerms in the specified parent.
  repeated GlossaryTerm terms = 1;

  // A token, which can be sent as `page_token` to retrieve the next page.
  // If this field is omitted, there are no subsequent pages.
  string next_page_token = 2;

  // Locations that the service couldn't reach.
  repeated string unreachable_locations = 3;
}
