Skip to content

Commit

Permalink
chore: enable gapicv2 for datacatalog/v1beta1 API
Browse files Browse the repository at this point in the history
Committer: @miraleung
PiperOrigin-RevId: 310415142
  • Loading branch information
Google APIs authored and copybara-github committed May 7, 2020
1 parent 2fc2caa commit 684dfea
Show file tree
Hide file tree
Showing 4 changed files with 655 additions and 483 deletions.
107 changes: 65 additions & 42 deletions google/cloud/datacatalog/v1/datacatalog.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ option ruby_package = "Google::Cloud::DataCatalog::V1";
// their data.
service DataCatalog {
option (google.api.default_host) = "datacatalog.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// Searches Data Catalog for multiple resources like entries, tags that
// match a query.
Expand Down Expand Up @@ -125,15 +126,17 @@ service DataCatalog {
// identified by the `name` parameter (see [Data Catalog Resource Project]
// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
// more information).
rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) {
rpc DeleteEntryGroup(DeleteEntryGroupRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/entryGroups/*}"
};
option (google.api.method_signature) = "name";
}

// Lists entry groups.
rpc ListEntryGroups(ListEntryGroupsRequest) returns (ListEntryGroupsResponse) {
rpc ListEntryGroups(ListEntryGroupsRequest)
returns (ListEntryGroupsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/entryGroups"
};
Expand Down Expand Up @@ -220,7 +223,8 @@ service DataCatalog {
post: "/v1/{parent=projects/*/locations/*}/tagTemplates"
body: "tag_template"
};
option (google.api.method_signature) = "parent,tag_template_id,tag_template";
option (google.api.method_signature) =
"parent,tag_template_id,tag_template";
}

// Gets a tag template.
Expand Down Expand Up @@ -252,7 +256,8 @@ service DataCatalog {
// the `name` parameter (see [Data Catalog Resource Project]
// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
// more information).
rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) {
rpc DeleteTagTemplate(DeleteTagTemplateRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/tagTemplates/*}"
};
Expand All @@ -264,34 +269,39 @@ service DataCatalog {
// [Data Catalog Resource
// Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project)
// for more information).
rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) {
rpc CreateTagTemplateField(CreateTagTemplateFieldRequest)
returns (TagTemplateField) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields"
body: "tag_template_field"
};
option (google.api.method_signature) = "parent,tag_template_field_id,tag_template_field";
option (google.api.method_signature) =
"parent,tag_template_field_id,tag_template_field";
}

// Updates a field in a tag template. This method cannot be used to update the
// field type. Users should enable the Data Catalog API in the project
// identified by the `name` parameter (see [Data Catalog Resource Project]
// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
// more information).
rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) {
rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest)
returns (TagTemplateField) {
option (google.api.http) = {
patch: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}"
body: "tag_template_field"
};
option (google.api.method_signature) = "name,tag_template_field";
option (google.api.method_signature) = "name,tag_template_field,update_mask";
option (google.api.method_signature) =
"name,tag_template_field,update_mask";
}

// Renames a field in a tag template. The user should enable the Data Catalog
// API in the project identified by the `name` parameter (see [Data Catalog
// Resource
// Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project)
// for more information).
rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) {
rpc RenameTagTemplateField(RenameTagTemplateFieldRequest)
returns (TagTemplateField) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename"
body: "*"
Expand All @@ -304,7 +314,8 @@ service DataCatalog {
// the `name` parameter (see [Data Catalog Resource Project]
// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
// more information).
rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) {
rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}"
};
Expand Down Expand Up @@ -380,7 +391,8 @@ service DataCatalog {
// templates.
// - `datacatalog.entries.setIamPolicy` to set policies on entries.
// - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
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: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy"
body: "*"
Expand All @@ -389,6 +401,7 @@ service DataCatalog {
body: "*"
}
};
option (google.api.method_signature) = "resource,policy";
}

// Gets the access control policy for a resource. A `NOT_FOUND` error
Expand All @@ -407,7 +420,8 @@ service DataCatalog {
// templates.
// - `datacatalog.entries.getIamPolicy` to get policies on entries.
// - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
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: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy"
body: "*"
Expand All @@ -420,6 +434,7 @@ service DataCatalog {
body: "*"
}
};
option (google.api.method_signature) = "resource";
}

// Returns the caller's permissions on a resource.
Expand All @@ -435,7 +450,8 @@ service DataCatalog {
//
// A caller is not required to have Google IAM permission to make this
// request.
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: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions"
body: "*"
Expand Down Expand Up @@ -507,7 +523,8 @@ message SearchCatalogRequest {
// * us-east4
// * us-west1
// * us-west2
repeated string restricted_locations = 16 [(google.api.field_behavior) = OPTIONAL];
repeated string restricted_locations = 16
[(google.api.field_behavior) = OPTIONAL];
}

// Required. The scope of this search request. A `scope` that has empty
Expand All @@ -516,7 +533,8 @@ message SearchCatalogRequest {
// return an error in such a case.
Scope scope = 6 [(google.api.field_behavior) = REQUIRED];

// Required. The query string in search query syntax. The query must be non-empty.
// Required. The query string in search query syntax. The query must be
// non-empty.
//
// Query strings can be simple as "x" or more qualified as:
//
Expand All @@ -535,8 +553,8 @@ message SearchCatalogRequest {
int32 page_size = 2;

// Optional. Pagination token returned in an earlier
// [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
// indicates that this is a continuation of a prior
// [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token],
// which indicates that this is a continuation of a prior
// [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
// call, and that the system should return the next page of data. If empty,
// the first page is returned.
Expand Down Expand Up @@ -640,8 +658,8 @@ message DeleteEntryGroupRequest {
// Request message for
// [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].
message ListEntryGroupsRequest {
// Required. The name of the location that contains the entry groups, which can be
// provided in URL format. Example:
// Required. The name of the location that contains the entry groups, which
// can be provided in URL format. Example:
//
// * projects/{project_id}/locations/{location}
string parent = 1 [
Expand All @@ -651,12 +669,12 @@ message ListEntryGroupsRequest {
}
];

// Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
// Throws an invalid argument for `page_size > 1000`.
// Optional. The maximum number of items to return. Default is 10. Max limit
// is 1000. Throws an invalid argument for `page_size > 1000`.
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. Token that specifies which page is requested. If empty, the first page is
// returned.
// Optional. Token that specifies which page is requested. If empty, the first
// page is returned.
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}

Expand Down Expand Up @@ -807,8 +825,8 @@ message Entry {
// Note that this Entry and its child resources may not actually be stored in
// the location in this name.
string name = 1 [(google.api.resource_reference) = {
type: "datacatalog.googleapis.com/EntryGroup"
}];
type: "datacatalog.googleapis.com/EntryGroup"
}];

// The resource this metadata entry refers to.
//
Expand Down Expand Up @@ -845,9 +863,10 @@ message Entry {

// The source system of the entry.
oneof system {
// Output only. This field indicates the entry's source system that Data Catalog
// integrates with, such as BigQuery or Pub/Sub.
IntegratedSystem integrated_system = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. This field indicates the entry's source system that Data
// Catalog integrates with, such as BigQuery or Pub/Sub.
IntegratedSystem integrated_system = 17
[(google.api.field_behavior) = OUTPUT_ONLY];

// This field indicates the entry's source system that Data Catalog does not
// integrate with. `user_specified_system` strings must begin with a letter
Expand Down Expand Up @@ -918,8 +937,10 @@ message EntryGroup {
// string.
string description = 3;

// Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
SystemTimestamps data_catalog_timestamps = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamps about this EntryGroup. Default value is empty
// timestamps.
SystemTimestamps data_catalog_timestamps = 4
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// Request message for
Expand Down Expand Up @@ -997,18 +1018,16 @@ message DeleteTagTemplateRequest {
// Request message for
// [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag].
message CreateTagRequest {
// Required. The name of the resource to attach this tag to. Tags can be attached to
// Entries. Example:
// Required. The name of the resource to attach this tag to. Tags can be
// attached to Entries. Example:
//
// * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
//
// Note that this Tag and its child resources may not actually be stored in
// the location in this name.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datacatalog.googleapis.com/Tag"
}
(google.api.resource_reference) = { type: "datacatalog.googleapis.com/Tag" }
];

// Required. The tag to create.
Expand Down Expand Up @@ -1064,7 +1083,8 @@ message CreateTagTemplateFieldRequest {
string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED];

// Required. The tag template field to create.
TagTemplateField tag_template_field = 3 [(google.api.field_behavior) = REQUIRED];
TagTemplateField tag_template_field = 3
[(google.api.field_behavior) = REQUIRED];
}

// Request message for
Expand All @@ -1081,7 +1101,8 @@ message UpdateTagTemplateFieldRequest {
];

// Required. The template to update.
TagTemplateField tag_template_field = 2 [(google.api.field_behavior) = REQUIRED];
TagTemplateField tag_template_field = 2
[(google.api.field_behavior) = REQUIRED];

// Optional. The field mask specifies the parts of the template to be updated.
// Allowed fields:
Expand All @@ -1097,7 +1118,8 @@ message UpdateTagTemplateFieldRequest {
// existing values. Therefore, enum values can only be added, existing enum
// values cannot be deleted nor renamed. Updating a template field from
// optional to required is NOT allowed.
google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL];
google.protobuf.FieldMask update_mask = 3
[(google.api.field_behavior) = OPTIONAL];
}

// Request message for
Expand All @@ -1113,7 +1135,8 @@ message RenameTagTemplateFieldRequest {
}
];

// Required. The new ID of this tag template field. For example, `my_new_field`.
// Required. The new ID of this tag template field. For example,
// `my_new_field`.
string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED];
}

Expand All @@ -1139,8 +1162,8 @@ message DeleteTagTemplateFieldRequest {
// Request message for
// [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].
message ListTagsRequest {
// Required. The name of the Data Catalog resource to list the tags of. The resource
// could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
// Required. The name of the Data Catalog resource to list the tags of. The
// resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
// [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
//
// Examples:
Expand Down
3 changes: 3 additions & 0 deletions google/cloud/datacatalog/v1beta1/datacatalog.proto
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ service DataCatalog {
body: "*"
}
};

option (google.api.method_signature) = "resource,policy";
}

// Gets the access control policy for a resource. A `NOT_FOUND` error
Expand Down Expand Up @@ -408,6 +410,7 @@ service DataCatalog {
body: "*"
}
};
option (google.api.method_signature) = "resource";
}

// Returns the caller's permissions on a resource.
Expand Down
Loading

0 comments on commit 684dfea

Please sign in to comment.