From ad59db3bca65e2e1a6bdea2a886238757e9d365b Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Fri, 7 Feb 2020 05:19:14 -0800 Subject: [PATCH] [CHANGE ME] Re-generated asset to pick up changes in the API or client library generator. --- .../gapic/asset_service_client.py | 5 +- .../asset_service_grpc_transport.py | 3 +- .../asset_v1beta1/proto/asset_service.proto | 47 +- .../asset_v1beta1/proto/asset_service_pb2.py | 104 ++- .../proto/asset_service_pb2_grpc.py | 2 + .../cloud/asset_v1beta1/proto/assets.proto | 9 +- .../cloud/asset_v1beta1/proto/assets_pb2.py | 25 +- .../google/cloud/asset_v1p1beta1/__init__.py | 13 +- .../gapic/asset_service_client.py | 2 +- .../asset_service_grpc_transport.py | 2 +- .../proto/asset_service_pb2.py | 56 +- .../cloud/asset_v1p1beta1/proto/assets_pb2.py | 32 +- asset/google/cloud/asset_v1p1beta1/types.py | 2 +- .../gapic/asset_service_client.py | 257 +----- .../gapic/asset_service_client_config.py | 10 - .../cloud/asset_v1p2beta1/gapic/enums.py | 20 - .../asset_service_grpc_transport.py | 41 - .../asset_v1p2beta1/proto/asset_service.proto | 229 ++--- .../proto/asset_service_pb2.py | 821 ++---------------- .../proto/asset_service_pb2_grpc.py | 44 - .../cloud/asset_v1p2beta1/proto/assets.proto | 13 +- .../cloud/asset_v1p2beta1/proto/assets_pb2.py | 65 +- asset/google/cloud/asset_v1p2beta1/types.py | 28 +- asset/synth.metadata | 239 +---- .../test_asset_service_client_v1p1beta1.py | 2 +- .../test_asset_service_client_v1p2beta1.py | 103 --- 26 files changed, 396 insertions(+), 1778 deletions(-) diff --git a/asset/google/cloud/asset_v1beta1/gapic/asset_service_client.py b/asset/google/cloud/asset_v1beta1/gapic/asset_service_client.py index cad3b240d337..3a6158921e89 100644 --- a/asset/google/cloud/asset_v1beta1/gapic/asset_service_client.py +++ b/asset/google/cloud/asset_v1beta1/gapic/asset_service_client.py @@ -332,7 +332,8 @@ def batch_get_assets_history( RESOURCE content, this API outputs history with asset in both non-delete or deleted status. For IAM\_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create - gaps in the output history. + gaps in the output history. If a specified asset does not exist, this + API returns an INVALID\_ARGUMENT error. Example: >>> from google.cloud import asset_v1beta1 @@ -354,7 +355,7 @@ def batch_get_assets_history( parent (str): Required. The relative name of the root asset. It can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345"). - content_type (~google.cloud.asset_v1beta1.types.ContentType): Required. The content type. + content_type (~google.cloud.asset_v1beta1.types.ContentType): Optional. The content type. read_time_window (Union[dict, ~google.cloud.asset_v1beta1.types.TimeWindow]): Optional. The time window for the asset history. Both start\_time and end\_time are optional and if set, it must be after 2018-10-02 UTC. If end\_time is not set, it is default to current timestamp. If start\_time diff --git a/asset/google/cloud/asset_v1beta1/gapic/transports/asset_service_grpc_transport.py b/asset/google/cloud/asset_v1beta1/gapic/transports/asset_service_grpc_transport.py index 348e4fa6c8d8..abe776b7801a 100644 --- a/asset/google/cloud/asset_v1beta1/gapic/transports/asset_service_grpc_transport.py +++ b/asset/google/cloud/asset_v1beta1/gapic/transports/asset_service_grpc_transport.py @@ -139,7 +139,8 @@ def batch_get_assets_history(self): RESOURCE content, this API outputs history with asset in both non-delete or deleted status. For IAM\_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create - gaps in the output history. + gaps in the output history. If a specified asset does not exist, this + API returns an INVALID\_ARGUMENT error. Returns: Callable: A callable which accepts the appropriate diff --git a/asset/google/cloud/asset_v1beta1/proto/asset_service.proto b/asset/google/cloud/asset_v1beta1/proto/asset_service.proto index 8e2d1b0a387e..956c6a7677ac 100644 --- a/asset/google/cloud/asset_v1beta1/proto/asset_service.proto +++ b/asset/google/cloud/asset_v1beta1/proto/asset_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.asset.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/asset/v1beta1/assets.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/timestamp.proto"; @@ -31,6 +34,10 @@ option php_namespace = "Google\\Cloud\\Asset\\V1beta1"; // Asset service definition. service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + // Exports assets with time and resource types to a given Cloud Storage // location. The output format is newline-delimited JSON. // This API implements the @@ -49,6 +56,10 @@ service AssetService { body: "*" } }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1beta1.ExportAssetsResponse" + metadata_type: "google.cloud.asset.v1beta1.ExportAssetsRequest" + }; } // Batch gets the update history of assets that overlap a time window. @@ -56,6 +67,8 @@ service AssetService { // non-delete or deleted status. // For IAM_POLICY content, this API outputs history when the asset and its // attached IAM POLICY both exist. This can create gaps in the output history. + // If a specified asset does not exist, this API returns an INVALID_ARGUMENT + // error. rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) returns (BatchGetAssetsHistoryResponse) { option (google.api.http) = { @@ -73,7 +86,12 @@ message ExportAssetsRequest { // organization number (such as "organizations/123"), a project ID (such as // "projects/my-project-id"), a project number (such as "projects/12345"), or // a folder number (such as "folders/123"). - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; // Timestamp to take an asset snapshot. This can only be set to a timestamp // between 2018-10-02 UTC (inclusive) and the current time. If not specified, @@ -95,7 +113,7 @@ message ExportAssetsRequest { // Required. Output configuration indicating where the results will be output // to. All results will be in newline delimited JSON format. - OutputConfig output_config = 5; + OutputConfig output_config = 5 [(google.api.field_behavior) = REQUIRED]; } // The export asset response. This message is returned by the @@ -117,7 +135,12 @@ message BatchGetAssetsHistoryRequest { // Required. The relative name of the root asset. It can only be an // organization number (such as "organizations/123"), a project ID (such as // "projects/my-project-id")", or a project number (such as "projects/12345"). - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; // A list of the full names of the assets. For example: // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. @@ -129,8 +152,8 @@ message BatchGetAssetsHistoryRequest { // size of the asset name list is 100 in one request. repeated string asset_names = 2; - // Required. The content type. - ContentType content_type = 3; + // Optional. The content type. + ContentType content_type = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The time window for the asset history. Both start_time and // end_time are optional and if set, it must be after 2018-10-02 UTC. If @@ -138,7 +161,7 @@ message BatchGetAssetsHistoryRequest { // not set, the snapshot of the assets at end_time will be returned. The // returned results contain all temporal assets whose time window overlap with // read_time_window. - TimeWindow read_time_window = 4; + TimeWindow read_time_window = 4 [(google.api.field_behavior) = OPTIONAL]; } // Batch get assets history response. @@ -166,6 +189,16 @@ message GcsDestination { // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) // for more information. string uri = 1; + + // The uri prefix of all generated Cloud Storage objects. For example: + // "gs://bucket_name/object_name_prefix". Each object uri is in format: + // "gs://bucket_name/object_name_prefix// and only + // contains assets for that type. starts from 0. For example: + // "gs://bucket_name/object_name_prefix/google.compute.disk/0" is the first + // shard of output objects containing all google.compute.disk assets. + // An INVALID_ARGUMENT error will be returned if file with the same name + // "gs://bucket_name/object_name_prefix" already exists. + string uri_prefix = 2; } } diff --git a/asset/google/cloud/asset_v1beta1/proto/asset_service_pb2.py b/asset/google/cloud/asset_v1beta1/proto/asset_service_pb2.py index bd97c5aa8137..2d3b457a8ae8 100644 --- a/asset/google/cloud/asset_v1beta1/proto/asset_service_pb2.py +++ b/asset/google/cloud/asset_v1beta1/proto/asset_service_pb2.py @@ -17,6 +17,9 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.asset_v1beta1.proto import ( assets_pb2 as google_dot_cloud_dot_asset__v1beta1_dot_proto_dot_assets__pb2, ) @@ -34,10 +37,13 @@ "\n\036com.google.cloud.asset.v1beta1B\021AssetServiceProtoP\001Z?google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset\252\002\032Google.Cloud.Asset.V1Beta1\312\002\032Google\\Cloud\\Asset\\V1beta1" ), serialized_pb=_b( - '\n4google/cloud/asset_v1beta1/proto/asset_service.proto\x12\x1agoogle.cloud.asset.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a-google/cloud/asset_v1beta1/proto/assets.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xe9\x01\n\x13\x45xportAssetsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12=\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32\'.google.cloud.asset.v1beta1.ContentType\x12?\n\routput_config\x18\x05 \x01(\x0b\x32(.google.cloud.asset.v1beta1.OutputConfig"\x86\x01\n\x14\x45xportAssetsResponse\x12-\n\tread_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12?\n\routput_config\x18\x02 \x01(\x0b\x32(.google.cloud.asset.v1beta1.OutputConfig"\xc4\x01\n\x1c\x42\x61tchGetAssetsHistoryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12=\n\x0c\x63ontent_type\x18\x03 \x01(\x0e\x32\'.google.cloud.asset.v1beta1.ContentType\x12@\n\x10read_time_window\x18\x04 \x01(\x0b\x32&.google.cloud.asset.v1beta1.TimeWindow"Z\n\x1d\x42\x61tchGetAssetsHistoryResponse\x12\x39\n\x06\x61ssets\x18\x01 \x03(\x0b\x32).google.cloud.asset.v1beta1.TemporalAsset"d\n\x0cOutputConfig\x12\x45\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32*.google.cloud.asset.v1beta1.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"-\n\x0eGcsDestination\x12\r\n\x03uri\x18\x01 \x01(\tH\x00\x42\x0c\n\nobject_uri*I\n\x0b\x43ontentType\x12\x1c\n\x18\x43ONTENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOURCE\x10\x01\x12\x0e\n\nIAM_POLICY\x10\x02\x32\x91\x04\n\x0c\x41ssetService\x12\xfa\x01\n\x0c\x45xportAssets\x12/.google.cloud.asset.v1beta1.ExportAssetsRequest\x1a\x1d.google.longrunning.Operation"\x99\x01\x82\xd3\xe4\x93\x02\x92\x01")/v1beta1/{parent=projects/*}:exportAssets:\x01*Z-"(/v1beta1/{parent=folders/*}:exportAssets:\x01*Z3"./v1beta1/{parent=organizations/*}:exportAssets:\x01*\x12\x83\x02\n\x15\x42\x61tchGetAssetsHistory\x12\x38.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest\x1a\x39.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse"u\x82\xd3\xe4\x93\x02o\x12\x32/v1beta1/{parent=projects/*}:batchGetAssetsHistoryZ9\x12\x37/v1beta1/{parent=organizations/*}:batchGetAssetsHistoryB\xb0\x01\n\x1e\x63om.google.cloud.asset.v1beta1B\x11\x41ssetServiceProtoP\x01Z?google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset\xaa\x02\x1aGoogle.Cloud.Asset.V1Beta1\xca\x02\x1aGoogle\\Cloud\\Asset\\V1beta1b\x06proto3' + '\n4google/cloud/asset_v1beta1/proto/asset_service.proto\x12\x1agoogle.cloud.asset.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/asset_v1beta1/proto/assets.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x97\x02\n\x13\x45xportAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12=\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32\'.google.cloud.asset.v1beta1.ContentType\x12\x44\n\routput_config\x18\x05 \x01(\x0b\x32(.google.cloud.asset.v1beta1.OutputConfigB\x03\xe0\x41\x02"\x86\x01\n\x14\x45xportAssetsResponse\x12-\n\tread_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12?\n\routput_config\x18\x02 \x01(\x0b\x32(.google.cloud.asset.v1beta1.OutputConfig"\xf7\x01\n\x1c\x42\x61tchGetAssetsHistoryRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudasset.googleapis.com/Asset\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12\x42\n\x0c\x63ontent_type\x18\x03 \x01(\x0e\x32\'.google.cloud.asset.v1beta1.ContentTypeB\x03\xe0\x41\x01\x12\x45\n\x10read_time_window\x18\x04 \x01(\x0b\x32&.google.cloud.asset.v1beta1.TimeWindowB\x03\xe0\x41\x01"Z\n\x1d\x42\x61tchGetAssetsHistoryResponse\x12\x39\n\x06\x61ssets\x18\x01 \x03(\x0b\x32).google.cloud.asset.v1beta1.TemporalAsset"d\n\x0cOutputConfig\x12\x45\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32*.google.cloud.asset.v1beta1.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"C\n\x0eGcsDestination\x12\r\n\x03uri\x18\x01 \x01(\tH\x00\x12\x14\n\nuri_prefix\x18\x02 \x01(\tH\x00\x42\x0c\n\nobject_uri*I\n\x0b\x43ontentType\x12\x1c\n\x18\x43ONTENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOURCE\x10\x01\x12\x0e\n\nIAM_POLICY\x10\x02\x32\xc4\x05\n\x0c\x41ssetService\x12\xde\x02\n\x0c\x45xportAssets\x12/.google.cloud.asset.v1beta1.ExportAssetsRequest\x1a\x1d.google.longrunning.Operation"\xfd\x01\x82\xd3\xe4\x93\x02\x92\x01")/v1beta1/{parent=projects/*}:exportAssets:\x01*Z-"(/v1beta1/{parent=folders/*}:exportAssets:\x01*Z3"./v1beta1/{parent=organizations/*}:exportAssets:\x01*\xca\x41\x61\n/google.cloud.asset.v1beta1.ExportAssetsResponse\x12.google.cloud.asset.v1beta1.ExportAssetsRequest\x12\x83\x02\n\x15\x42\x61tchGetAssetsHistory\x12\x38.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest\x1a\x39.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse"u\x82\xd3\xe4\x93\x02o\x12\x32/v1beta1/{parent=projects/*}:batchGetAssetsHistoryZ9\x12\x37/v1beta1/{parent=organizations/*}:batchGetAssetsHistory\x1aM\xca\x41\x19\x63loudasset.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb0\x01\n\x1e\x63om.google.cloud.asset.v1beta1B\x11\x41ssetServiceProtoP\x01Z?google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset\xaa\x02\x1aGoogle.Cloud.Asset.V1Beta1\xca\x02\x1aGoogle\\Cloud\\Asset\\V1beta1b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_asset__v1beta1_dot_proto_dot_assets__pb2.DESCRIPTOR, google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, @@ -66,8 +72,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1044, - serialized_end=1117, + serialized_start=1248, + serialized_end=1321, ) _sym_db.RegisterEnumDescriptor(_CONTENTTYPE) @@ -99,7 +105,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\022\037cloudasset.googleapis.com/Asset" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -171,7 +179,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -183,8 +191,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=232, - serialized_end=465, + serialized_start=317, + serialized_end=596, ) @@ -240,8 +248,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=468, - serialized_end=602, + serialized_start=599, + serialized_end=733, ) @@ -267,7 +275,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\022\037cloudasset.googleapis.com/Asset" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -303,7 +313,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -321,7 +331,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -333,8 +343,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=605, - serialized_end=801, + serialized_start=736, + serialized_end=983, ) @@ -372,8 +382,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=803, - serialized_end=893, + serialized_start=985, + serialized_end=1075, ) @@ -419,8 +429,8 @@ fields=[], ) ], - serialized_start=895, - serialized_end=995, + serialized_start=1077, + serialized_end=1177, ) @@ -448,7 +458,25 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), + _descriptor.FieldDescriptor( + name="uri_prefix", + full_name="google.cloud.asset.v1beta1.GcsDestination.uri_prefix", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[], @@ -466,8 +494,8 @@ fields=[], ) ], - serialized_start=997, - serialized_end=1042, + serialized_start=1179, + serialized_end=1246, ) _EXPORTASSETSREQUEST.fields_by_name[ @@ -503,6 +531,12 @@ _GCSDESTINATION.fields_by_name["uri"].containing_oneof = _GCSDESTINATION.oneofs_by_name[ "object_uri" ] +_GCSDESTINATION.oneofs_by_name["object_uri"].fields.append( + _GCSDESTINATION.fields_by_name["uri_prefix"] +) +_GCSDESTINATION.fields_by_name[ + "uri_prefix" +].containing_oneof = _GCSDESTINATION.oneofs_by_name["object_uri"] DESCRIPTOR.message_types_by_name["ExportAssetsRequest"] = _EXPORTASSETSREQUEST DESCRIPTOR.message_types_by_name["ExportAssetsResponse"] = _EXPORTASSETSRESPONSE DESCRIPTOR.message_types_by_name[ @@ -608,7 +642,7 @@ empty, and the max size of the asset name list is 100 in one request. content_type: - Required. The content type. + Optional. The content type. read_time_window: Optional. The time window for the asset history. Both start\_time and end\_time are optional and if set, it must be @@ -679,6 +713,17 @@ See `Viewing and Editing Object Metadata `__ for more information. + uri_prefix: + The uri prefix of all generated Cloud Storage objects. For + example: "gs://bucket\_name/object\_name\_prefix". Each object + uri is in format: "gs://bucket\_name/object\_name\_prefix// + and only contains assets for that type. starts from 0. For + example: + "gs://bucket\_name/object\_name\_prefix/google.compute.disk/0" + is the first shard of output objects containing all + google.compute.disk assets. An INVALID\_ARGUMENT error will be + returned if file with the same name + "gs://bucket\_name/object\_name\_prefix" already exists. """, # @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.GcsDestination) ), @@ -687,15 +732,22 @@ DESCRIPTOR._options = None +_EXPORTASSETSREQUEST.fields_by_name["parent"]._options = None +_EXPORTASSETSREQUEST.fields_by_name["output_config"]._options = None +_BATCHGETASSETSHISTORYREQUEST.fields_by_name["parent"]._options = None +_BATCHGETASSETSHISTORYREQUEST.fields_by_name["content_type"]._options = None +_BATCHGETASSETSHISTORYREQUEST.fields_by_name["read_time_window"]._options = None _ASSETSERVICE = _descriptor.ServiceDescriptor( name="AssetService", full_name="google.cloud.asset.v1beta1.AssetService", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=1120, - serialized_end=1649, + serialized_options=_b( + "\312A\031cloudasset.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform" + ), + serialized_start=1324, + serialized_end=2032, methods=[ _descriptor.MethodDescriptor( name="ExportAssets", @@ -705,7 +757,7 @@ input_type=_EXPORTASSETSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002\222\001")/v1beta1/{parent=projects/*}:exportAssets:\001*Z-"(/v1beta1/{parent=folders/*}:exportAssets:\001*Z3"./v1beta1/{parent=organizations/*}:exportAssets:\001*' + '\202\323\344\223\002\222\001")/v1beta1/{parent=projects/*}:exportAssets:\001*Z-"(/v1beta1/{parent=folders/*}:exportAssets:\001*Z3"./v1beta1/{parent=organizations/*}:exportAssets:\001*\312Aa\n/google.cloud.asset.v1beta1.ExportAssetsResponse\022.google.cloud.asset.v1beta1.ExportAssetsRequest' ), ), _descriptor.MethodDescriptor( diff --git a/asset/google/cloud/asset_v1beta1/proto/asset_service_pb2_grpc.py b/asset/google/cloud/asset_v1beta1/proto/asset_service_pb2_grpc.py index 35e7c536eae5..24a26e0cfef3 100644 --- a/asset/google/cloud/asset_v1beta1/proto/asset_service_pb2_grpc.py +++ b/asset/google/cloud/asset_v1beta1/proto/asset_service_pb2_grpc.py @@ -52,6 +52,8 @@ def BatchGetAssetsHistory(self, request, context): non-delete or deleted status. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. + If a specified asset does not exist, this API returns an INVALID_ARGUMENT + error. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") diff --git a/asset/google/cloud/asset_v1beta1/proto/assets.proto b/asset/google/cloud/asset_v1beta1/proto/assets.proto index 84db977b97d7..4bb1438c8d74 100644 --- a/asset/google/cloud/asset_v1beta1/proto/assets.proto +++ b/asset/google/cloud/asset_v1beta1/proto/assets.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,11 +18,13 @@ syntax = "proto3"; package google.cloud.asset.v1beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Asset.V1Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset"; option java_multiple_files = true; @@ -56,6 +58,11 @@ message TimeWindow { // Cloud asset. This includes all Google Cloud Platform resources, // Cloud IAM policies, and other non-GCP assets. message Asset { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Asset" + pattern: "*" + }; + // The full name of the asset. For example: // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. // See [Resource diff --git a/asset/google/cloud/asset_v1beta1/proto/assets_pb2.py b/asset/google/cloud/asset_v1beta1/proto/assets_pb2.py index 443ea09d6166..cec349e32803 100644 --- a/asset/google/cloud/asset_v1beta1/proto/assets_pb2.py +++ b/asset/google/cloud/asset_v1beta1/proto/assets_pb2.py @@ -16,6 +16,7 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.iam.v1 import iam_policy_pb2 as google_dot_iam_dot_v1_dot_policy__pb2 from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 @@ -27,13 +28,14 @@ package="google.cloud.asset.v1beta1", syntax="proto3", serialized_options=_b( - "\n\036com.google.cloud.asset.v1beta1B\nAssetProtoP\001Z?google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset\252\002\032Google.Cloud.Asset.V1Beta1\312\002\032Google\\Cloud\\Asset\\V1beta1" + "\n\036com.google.cloud.asset.v1beta1B\nAssetProtoP\001Z?google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset\370\001\001\252\002\032Google.Cloud.Asset.V1Beta1\312\002\032Google\\Cloud\\Asset\\V1beta1" ), serialized_pb=_b( - '\n-google/cloud/asset_v1beta1/proto/assets.proto\x12\x1agoogle.cloud.asset.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x8a\x01\n\rTemporalAsset\x12\x36\n\x06window\x18\x01 \x01(\x0b\x32&.google.cloud.asset.v1beta1.TimeWindow\x12\x0f\n\x07\x64\x65leted\x18\x02 \x01(\x08\x12\x30\n\x05\x61sset\x18\x03 \x01(\x0b\x32!.google.cloud.asset.v1beta1.Asset"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x8c\x01\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x36\n\x08resource\x18\x03 \x01(\x0b\x32$.google.cloud.asset.v1beta1.Resource\x12)\n\niam_policy\x18\x04 \x01(\x0b\x32\x15.google.iam.v1.Policy"\xa0\x01\n\x08Resource\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x1e\n\x16\x64iscovery_document_uri\x18\x02 \x01(\t\x12\x16\n\x0e\x64iscovery_name\x18\x03 \x01(\t\x12\x14\n\x0cresource_url\x18\x04 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12%\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\xa9\x01\n\x1e\x63om.google.cloud.asset.v1beta1B\nAssetProtoP\x01Z?google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset\xaa\x02\x1aGoogle.Cloud.Asset.V1Beta1\xca\x02\x1aGoogle\\Cloud\\Asset\\V1beta1b\x06proto3' + '\n-google/cloud/asset_v1beta1/proto/assets.proto\x12\x1agoogle.cloud.asset.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/api/resource.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x8a\x01\n\rTemporalAsset\x12\x36\n\x06window\x18\x01 \x01(\x0b\x32&.google.cloud.asset.v1beta1.TimeWindow\x12\x0f\n\x07\x64\x65leted\x18\x02 \x01(\x08\x12\x30\n\x05\x61sset\x18\x03 \x01(\x0b\x32!.google.cloud.asset.v1beta1.Asset"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xb5\x01\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x36\n\x08resource\x18\x03 \x01(\x0b\x32$.google.cloud.asset.v1beta1.Resource\x12)\n\niam_policy\x18\x04 \x01(\x0b\x32\x15.google.iam.v1.Policy:\'\xea\x41$\n\x1f\x63loudasset.googleapis.com/Asset\x12\x01*"\xa0\x01\n\x08Resource\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x1e\n\x16\x64iscovery_document_uri\x18\x02 \x01(\t\x12\x16\n\x0e\x64iscovery_name\x18\x03 \x01(\t\x12\x14\n\x0cresource_url\x18\x04 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12%\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\xac\x01\n\x1e\x63om.google.cloud.asset.v1beta1B\nAssetProtoP\x01Z?google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset\xf8\x01\x01\xaa\x02\x1aGoogle.Cloud.Asset.V1Beta1\xca\x02\x1aGoogle\\Cloud\\Asset\\V1beta1b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_iam_dot_v1_dot_policy__pb2.DESCRIPTOR, google_dot_protobuf_dot_any__pb2.DESCRIPTOR, google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, @@ -112,8 +114,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=226, - serialized_end=364, + serialized_start=253, + serialized_end=391, ) @@ -169,8 +171,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=366, - serialized_end=472, + serialized_start=393, + serialized_end=499, ) @@ -257,13 +259,13 @@ extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=_b("\352A$\n\037cloudasset.googleapis.com/Asset\022\001*"), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=475, - serialized_end=615, + serialized_start=502, + serialized_end=683, ) @@ -391,8 +393,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=618, - serialized_end=778, + serialized_start=686, + serialized_end=846, ) _TEMPORALASSET.fields_by_name["window"].message_type = _TIMEWINDOW @@ -541,4 +543,5 @@ DESCRIPTOR._options = None +_ASSET._options = None # @@protoc_insertion_point(module_scope) diff --git a/asset/google/cloud/asset_v1p1beta1/__init__.py b/asset/google/cloud/asset_v1p1beta1/__init__.py index d8cba9f950d0..9c5b3b33e041 100644 --- a/asset/google/cloud/asset_v1p1beta1/__init__.py +++ b/asset/google/cloud/asset_v1p1beta1/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,22 @@ from __future__ import absolute_import +import sys +import warnings from google.cloud.asset_v1p1beta1 import types from google.cloud.asset_v1p1beta1.gapic import asset_service_client +if sys.version_info[:2] == (2, 7): + message = ( + "A future version of this library will drop support for Python 2.7." + "More details about Python 2 support for Google Cloud Client Libraries" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + class AssetServiceClient(asset_service_client.AssetServiceClient): __doc__ = asset_service_client.AssetServiceClient.__doc__ diff --git a/asset/google/cloud/asset_v1p1beta1/gapic/asset_service_client.py b/asset/google/cloud/asset_v1p1beta1/gapic/asset_service_client.py index cb6de10069ac..312f14e28897 100644 --- a/asset/google/cloud/asset_v1p1beta1/gapic/asset_service_client.py +++ b/asset/google/cloud/asset_v1p1beta1/gapic/asset_service_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/google/cloud/asset_v1p1beta1/gapic/transports/asset_service_grpc_transport.py b/asset/google/cloud/asset_v1p1beta1/gapic/transports/asset_service_grpc_transport.py index cb3a63cc4363..8dace8f9f28b 100644 --- a/asset/google/cloud/asset_v1p1beta1/gapic/transports/asset_service_grpc_transport.py +++ b/asset/google/cloud/asset_v1p1beta1/gapic/transports/asset_service_grpc_transport.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/google/cloud/asset_v1p1beta1/proto/asset_service_pb2.py b/asset/google/cloud/asset_v1p1beta1/proto/asset_service_pb2.py index cdc0f0bae5db..c7c7de08fc4a 100644 --- a/asset/google/cloud/asset_v1p1beta1/proto/asset_service_pb2.py +++ b/asset/google/cloud/asset_v1p1beta1/proto/asset_service_pb2.py @@ -16,11 +16,11 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.cloud.asset_v1p1beta1.proto import ( assets_pb2 as google_dot_cloud_dot_asset__v1p1beta1_dot_proto_dot_assets__pb2, ) -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -31,13 +31,13 @@ "\n com.google.cloud.asset.v1p1beta1B\021AssetServiceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset\252\002\034Google.Cloud.Asset.V1P1Beta1\312\002\034Google\\Cloud\\Asset\\V1p1beta1" ), serialized_pb=_b( - '\n6google/cloud/asset_v1p1beta1/proto/asset_service.proto\x12\x1cgoogle.cloud.asset.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a/google/cloud/asset_v1p1beta1/proto/assets.proto\x1a\x17google/api/client.proto"\x8b\x01\n\x16SearchResourcesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sset_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"{\n\x17SearchResourcesResponse\x12G\n\x07results\x18\x01 \x03(\x0b\x32\x36.google.cloud.asset.v1p1beta1.StandardResourceMetadata\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"s\n\x18SearchIamPoliciesRequest\x12\x12\n\x05scope\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01"z\n\x19SearchIamPoliciesResponse\x12\x44\n\x07results\x18\x01 \x03(\x0b\x32\x33.google.cloud.asset.v1p1beta1.IamPolicySearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8e\x01\n\x19SearchAllResourcesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sset_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"~\n\x1aSearchAllResourcesResponse\x12G\n\x07results\x18\x01 \x03(\x0b\x32\x36.google.cloud.asset.v1p1beta1.StandardResourceMetadata\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x1bSearchAllIamPoliciesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01"}\n\x1cSearchAllIamPoliciesResponse\x12\x44\n\x07results\x18\x01 \x03(\x0b\x32\x33.google.cloud.asset.v1p1beta1.IamPolicySearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xb5\x06\n\x0c\x41ssetService\x12\xa3\x01\n\x0fSearchResources\x12\x34.google.cloud.asset.v1p1beta1.SearchResourcesRequest\x1a\x35.google.cloud.asset.v1p1beta1.SearchResourcesResponse"#\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1p1beta1/resources:search\x12\xab\x01\n\x11SearchIamPolicies\x12\x36.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest\x1a\x37.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse"%\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1p1beta1/iamPolicies:search\x12\xbb\x01\n\x12SearchAllResources\x12\x37.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest\x1a\x38.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse"2\x82\xd3\xe4\x93\x02,\x12*/v1p1beta1/{scope=*/*}/resources:searchAll\x12\xc3\x01\n\x14SearchAllIamPolicies\x12\x39.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest\x1a:.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse"4\x82\xd3\xe4\x93\x02.\x12,/v1p1beta1/{scope=*/*}/iamPolicies:searchAll\x1aM\xca\x41\x19\x63loudasset.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x01\n com.google.cloud.asset.v1p1beta1B\x11\x41ssetServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset\xaa\x02\x1cGoogle.Cloud.Asset.V1P1Beta1\xca\x02\x1cGoogle\\Cloud\\Asset\\V1p1beta1b\x06proto3' + '\n6google/cloud/asset_v1p1beta1/proto/asset_service.proto\x12\x1cgoogle.cloud.asset.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a/google/cloud/asset_v1p1beta1/proto/assets.proto"\x8b\x01\n\x16SearchResourcesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sset_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"{\n\x17SearchResourcesResponse\x12G\n\x07results\x18\x01 \x03(\x0b\x32\x36.google.cloud.asset.v1p1beta1.StandardResourceMetadata\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"s\n\x18SearchIamPoliciesRequest\x12\x12\n\x05scope\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01"z\n\x19SearchIamPoliciesResponse\x12\x44\n\x07results\x18\x01 \x03(\x0b\x32\x33.google.cloud.asset.v1p1beta1.IamPolicySearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8e\x01\n\x19SearchAllResourcesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61sset_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"~\n\x1aSearchAllResourcesResponse\x12G\n\x07results\x18\x01 \x03(\x0b\x32\x36.google.cloud.asset.v1p1beta1.StandardResourceMetadata\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x1bSearchAllIamPoliciesRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01"}\n\x1cSearchAllIamPoliciesResponse\x12\x44\n\x07results\x18\x01 \x03(\x0b\x32\x33.google.cloud.asset.v1p1beta1.IamPolicySearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x85\x07\n\x0c\x41ssetService\x12\xbd\x01\n\x0fSearchResources\x12\x34.google.cloud.asset.v1p1beta1.SearchResourcesRequest\x1a\x35.google.cloud.asset.v1p1beta1.SearchResourcesResponse"=\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1p1beta1/resources:search\xda\x41\x17scope,query,asset_types\x12\xb9\x01\n\x11SearchIamPolicies\x12\x36.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest\x1a\x37.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse"3\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1p1beta1/iamPolicies:search\xda\x41\x0bscope,query\x12\xd5\x01\n\x12SearchAllResources\x12\x37.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest\x1a\x38.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse"L\x82\xd3\xe4\x93\x02,\x12*/v1p1beta1/{scope=*/*}/resources:searchAll\xda\x41\x17scope,query,asset_types\x12\xd1\x01\n\x14SearchAllIamPolicies\x12\x39.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest\x1a:.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse"B\x82\xd3\xe4\x93\x02.\x12,/v1p1beta1/{scope=*/*}/iamPolicies:searchAll\xda\x41\x0bscope,query\x1aM\xca\x41\x19\x63loudasset.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x01\n com.google.cloud.asset.v1p1beta1B\x11\x41ssetServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset\xaa\x02\x1cGoogle.Cloud.Asset.V1P1Beta1\xca\x02\x1cGoogle\\Cloud\\Asset\\V1p1beta1b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_cloud_dot_asset__v1p1beta1_dot_proto_dot_assets__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -739,10 +739,12 @@ Optional. A list of asset types that this request searches for. If empty, it will search all the supported asset types. page_size: - Optional. The page size for search result pagination. Returned - results may be fewer than requested. The value of this field - is capped at 2000. If set to the zero value, server will pick - an appropriate default. + Optional. The page size for search result pagination. Page + size is capped at 500 even if a larger value is given. If set + to zero, server will pick an appropriate default. Returned + results may be fewer than requested. When this happens, there + could be more results as long as ``next_page_token`` is + returned. page_token: Optional. If present, then retrieve the next batch of results from the preceding call to this method. ``page_token`` must be @@ -799,10 +801,12 @@ "policy:myuser@mydomain.com" \* "policy:(myuser@mydomain.com viewer)" page_size: - Optional. The page size for search result pagination. Returned - results may be fewer than requested. The maximum is 2000. If - set to the zero value, the server will pick an appropriate - default. + Optional. The page size for search result pagination. Page + size is capped at 500 even if a larger value is given. If set + to zero, server will pick an appropriate default. Returned + results may be fewer than requested. When this happens, there + could be more results as long as ``next_page_token`` is + returned. page_token: Optional. If present, retrieve the next batch of results from the preceding call to this method. ``page_token`` must be the @@ -861,10 +865,12 @@ Optional. A list of asset types that this request searches for. If empty, it will search all the supported asset types. page_size: - Optional. The page size for search result pagination. Returned - results may be fewer than requested. The value of this field - is capped at 2000. If set to the zero value, server will pick - an appropriate default. + Optional. The page size for search result pagination. Page + size is capped at 500 even if a larger value is given. If set + to zero, server will pick an appropriate default. Returned + results may be fewer than requested. When this happens, there + could be more results as long as ``next_page_token`` is + returned. page_token: Optional. If present, then retrieve the next batch of results from the preceding call to this method. ``page_token`` must be @@ -921,10 +927,12 @@ "policy:myuser@mydomain.com" \* "policy:(myuser@mydomain.com viewer)" page_size: - Optional. The page size for search result pagination. Returned - results may be fewer than requested. The maximum is 2000. If - set to the zero value, the server will pick an appropriate - default. + Optional. The page size for search result pagination. Page + size is capped at 500 even if a larger value is given. If set + to zero, server will pick an appropriate default. Returned + results may be fewer than requested. When this happens, there + could be more results as long as ``next_page_token`` is + returned. page_token: Optional. If present, retrieve the next batch of results from the preceding call to this method. ``page_token`` must be the @@ -991,7 +999,7 @@ "\312A\031cloudasset.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform" ), serialized_start=1254, - serialized_end=2075, + serialized_end=2155, methods=[ _descriptor.MethodDescriptor( name="SearchResources", @@ -1001,7 +1009,7 @@ input_type=_SEARCHRESOURCESREQUEST, output_type=_SEARCHRESOURCESRESPONSE, serialized_options=_b( - "\202\323\344\223\002\035\022\033/v1p1beta1/resources:search" + "\202\323\344\223\002\035\022\033/v1p1beta1/resources:search\332A\027scope,query,asset_types" ), ), _descriptor.MethodDescriptor( @@ -1012,7 +1020,7 @@ input_type=_SEARCHIAMPOLICIESREQUEST, output_type=_SEARCHIAMPOLICIESRESPONSE, serialized_options=_b( - "\202\323\344\223\002\037\022\035/v1p1beta1/iamPolicies:search" + "\202\323\344\223\002\037\022\035/v1p1beta1/iamPolicies:search\332A\013scope,query" ), ), _descriptor.MethodDescriptor( @@ -1023,7 +1031,7 @@ input_type=_SEARCHALLRESOURCESREQUEST, output_type=_SEARCHALLRESOURCESRESPONSE, serialized_options=_b( - "\202\323\344\223\002,\022*/v1p1beta1/{scope=*/*}/resources:searchAll" + "\202\323\344\223\002,\022*/v1p1beta1/{scope=*/*}/resources:searchAll\332A\027scope,query,asset_types" ), ), _descriptor.MethodDescriptor( @@ -1034,7 +1042,7 @@ input_type=_SEARCHALLIAMPOLICIESREQUEST, output_type=_SEARCHALLIAMPOLICIESRESPONSE, serialized_options=_b( - "\202\323\344\223\002.\022,/v1p1beta1/{scope=*/*}/iamPolicies:searchAll" + "\202\323\344\223\002.\022,/v1p1beta1/{scope=*/*}/iamPolicies:searchAll\332A\013scope,query" ), ), ], diff --git a/asset/google/cloud/asset_v1p1beta1/proto/assets_pb2.py b/asset/google/cloud/asset_v1p1beta1/proto/assets_pb2.py index ef68efd0c8ae..e8cfb8d79be4 100644 --- a/asset/google/cloud/asset_v1p1beta1/proto/assets_pb2.py +++ b/asset/google/cloud/asset_v1p1beta1/proto/assets_pb2.py @@ -27,7 +27,7 @@ "\n com.google.cloud.asset.v1p1beta1B\nAssetProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset\370\001\001\252\002\034Google.Cloud.Asset.V1P1Beta1\312\002\034Google\\Cloud\\Asset\\V1p1beta1" ), serialized_pb=_b( - '\n/google/cloud/asset_v1p1beta1/proto/assets.proto\x12\x1cgoogle.cloud.asset.v1p1beta1\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1cgoogle/api/annotations.proto"x\n\x18StandardResourceMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x0f\n\x07project\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t"a\n\x15IamPolicySearchResult\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0f\n\x07project\x18\x03 \x01(\t\x12%\n\x06policy\x18\x04 \x01(\x0b\x32\x15.google.iam.v1.PolicyB\xb4\x01\n com.google.cloud.asset.v1p1beta1B\nAssetProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset\xf8\x01\x01\xaa\x02\x1cGoogle.Cloud.Asset.V1P1Beta1\xca\x02\x1cGoogle\\Cloud\\Asset\\V1p1beta1b\x06proto3' + '\n/google/cloud/asset_v1p1beta1/proto/assets.proto\x12\x1cgoogle.cloud.asset.v1p1beta1\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1cgoogle/api/annotations.proto"\x97\x01\n\x18StandardResourceMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x0f\n\x07project\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x1d\n\x15\x61\x64\x64itional_attributes\x18\n \x03(\t"a\n\x15IamPolicySearchResult\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0f\n\x07project\x18\x03 \x01(\t\x12%\n\x06policy\x18\x04 \x01(\x0b\x32\x15.google.iam.v1.PolicyB\xb4\x01\n com.google.cloud.asset.v1p1beta1B\nAssetProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset\xf8\x01\x01\xaa\x02\x1cGoogle.Cloud.Asset.V1P1Beta1\xca\x02\x1cGoogle\\Cloud\\Asset\\V1p1beta1b\x06proto3' ), dependencies=[ google_dot_iam_dot_v1_dot_policy__pb2.DESCRIPTOR, @@ -133,6 +133,24 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="additional_attributes", + full_name="google.cloud.asset.v1p1beta1.StandardResourceMetadata.additional_attributes", + index=5, + number=10, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[], @@ -142,8 +160,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=139, - serialized_end=259, + serialized_start=140, + serialized_end=291, ) @@ -217,8 +235,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=261, - serialized_end=358, + serialized_start=293, + serialized_end=390, ) _IAMPOLICYSEARCHRESULT.fields_by_name[ @@ -256,6 +274,10 @@ description: One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes. + additional_attributes: + Additional searchable attributes of this resource. + Informational only. The exact set of attributes is subject to + change. For example: project id, DNS name etc. """, # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.StandardResourceMetadata) ), diff --git a/asset/google/cloud/asset_v1p1beta1/types.py b/asset/google/cloud/asset_v1p1beta1/types.py index 7d5c664071b3..68b91edfc994 100644 --- a/asset/google/cloud/asset_v1p1beta1/types.py +++ b/asset/google/cloud/asset_v1p1beta1/types.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client.py b/asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client.py index 650c85f7cbc5..452566f162e1 100644 --- a/asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client.py +++ b/asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client.py @@ -26,8 +26,6 @@ import google.api_core.gapic_v1.method import google.api_core.gapic_v1.routing_header import google.api_core.grpc_helpers -import google.api_core.operation -import google.api_core.operations_v1 import google.api_core.path_template import grpc @@ -36,11 +34,8 @@ from google.cloud.asset_v1p2beta1.gapic.transports import asset_service_grpc_transport from google.cloud.asset_v1p2beta1.proto import asset_service_pb2 from google.cloud.asset_v1p2beta1.proto import asset_service_pb2_grpc -from google.cloud.asset_v1p2beta1.proto import assets_pb2 -from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 -from google.protobuf import timestamp_pb2 _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-asset").version @@ -196,240 +191,6 @@ def __init__( self._inner_api_calls = {} # Service calls - def export_assets( - self, - parent, - output_config, - read_time=None, - asset_types=None, - content_type=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Exports assets with time and resource types to a given Cloud Storage - location. The output format is newline-delimited JSON. This API - implements the ``google.longrunning.Operation`` API allowing you to keep - track of the export. - - Example: - >>> from google.cloud import asset_v1p2beta1 - >>> - >>> client = asset_v1p2beta1.AssetServiceClient() - >>> - >>> # TODO: Initialize `parent`: - >>> parent = '' - >>> - >>> # TODO: Initialize `output_config`: - >>> output_config = {} - >>> - >>> response = client.export_assets(parent, output_config) - >>> - >>> def callback(operation_future): - ... # Handle result. - ... result = operation_future.result() - >>> - >>> response.add_done_callback(callback) - >>> - >>> # Handle metadata. - >>> metadata = response.metadata() - - Args: - parent (str): Required. The relative name of the root asset. This can only be an - organization number (such as "organizations/123"), a project ID (such as - "projects/my-project-id"), or a project number (such as "projects/12345"). - output_config (Union[dict, ~google.cloud.asset_v1p2beta1.types.OutputConfig]): Required. Output configuration indicating where the results will be output - to. All results will be in newline delimited JSON format. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.asset_v1p2beta1.types.OutputConfig` - read_time (Union[dict, ~google.cloud.asset_v1p2beta1.types.Timestamp]): Timestamp to take an asset snapshot. This can only be set to a timestamp - between 2018-10-02 UTC (inclusive) and the current time. If not specified, - the current time will be used. Due to delays in resource data collection - and indexing, there is a volatile window during which running the same - query may get different results. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.asset_v1p2beta1.types.Timestamp` - asset_types (list[str]): A list of asset types of which to take a snapshot for. For example: - "compute.googleapis.com/Disk". If specified, only matching assets will - be returned. See `Introduction to Cloud Asset - Inventory `__ - for all supported asset types. - content_type (~google.cloud.asset_v1p2beta1.types.ContentType): Asset content type. If not specified, no content but the asset name will be - returned. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.cloud.asset_v1p2beta1.types._OperationFuture` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "export_assets" not in self._inner_api_calls: - self._inner_api_calls[ - "export_assets" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.export_assets, - default_retry=self._method_configs["ExportAssets"].retry, - default_timeout=self._method_configs["ExportAssets"].timeout, - client_info=self._client_info, - ) - - request = asset_service_pb2.ExportAssetsRequest( - parent=parent, - output_config=output_config, - read_time=read_time, - asset_types=asset_types, - content_type=content_type, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - operation = self._inner_api_calls["export_assets"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - return google.api_core.operation.from_gapic( - operation, - self.transport._operations_client, - asset_service_pb2.ExportAssetsResponse, - metadata_type=asset_service_pb2.ExportAssetsRequest, - ) - - def batch_get_assets_history( - self, - parent, - asset_names, - content_type, - read_time_window=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Batch gets the update history of assets that overlap a time window. For - RESOURCE content, this API outputs history with asset in both non-delete - or deleted status. For IAM\_POLICY content, this API outputs history - when the asset and its attached IAM POLICY both exist. This can create - gaps in the output history. - - Example: - >>> from google.cloud import asset_v1p2beta1 - >>> from google.cloud.asset_v1p2beta1 import enums - >>> - >>> client = asset_v1p2beta1.AssetServiceClient() - >>> - >>> # TODO: Initialize `parent`: - >>> parent = '' - >>> - >>> # TODO: Initialize `asset_names`: - >>> asset_names = [] - >>> - >>> # TODO: Initialize `content_type`: - >>> content_type = enums.ContentType.CONTENT_TYPE_UNSPECIFIED - >>> - >>> response = client.batch_get_assets_history(parent, asset_names, content_type) - - Args: - parent (str): Required. The relative name of the root asset. It can only be an - organization number (such as "organizations/123"), a project ID (such as - "projects/my-project-id")", or a project number (such as "projects/12345"). - asset_names (list[str]): A list of the full names of the assets. For example: - ``//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1``. - See `Resource - Names `__ - and `Resource Name - Format `__ - for more info. - - The request becomes a no-op if the asset name list is empty, and the max - size of the asset name list is 100 in one request. - content_type (~google.cloud.asset_v1p2beta1.types.ContentType): Required. The content type. - read_time_window (Union[dict, ~google.cloud.asset_v1p2beta1.types.TimeWindow]): Optional. The time window for the asset history. Both start\_time and - end\_time are optional and if set, it must be after 2018-10-02 UTC. If - end\_time is not set, it is default to current timestamp. If start\_time - is not set, the snapshot of the assets at end\_time will be returned. - The returned results contain all temporal assets whose time window - overlap with read\_time\_window. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.asset_v1p2beta1.types.TimeWindow` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.cloud.asset_v1p2beta1.types.BatchGetAssetsHistoryResponse` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "batch_get_assets_history" not in self._inner_api_calls: - self._inner_api_calls[ - "batch_get_assets_history" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.batch_get_assets_history, - default_retry=self._method_configs["BatchGetAssetsHistory"].retry, - default_timeout=self._method_configs["BatchGetAssetsHistory"].timeout, - client_info=self._client_info, - ) - - request = asset_service_pb2.BatchGetAssetsHistoryRequest( - parent=parent, - asset_names=asset_names, - content_type=content_type, - read_time_window=read_time_window, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["batch_get_assets_history"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def create_feed( self, parent, @@ -467,8 +228,8 @@ def create_feed( "projects/12345"). feed_id (str): Required. This is the client-assigned asset feed identifier and it needs to be unique under a specific parent project/folder/organization. - feed (Union[dict, ~google.cloud.asset_v1p2beta1.types.Feed]): The feed details. The field ``name`` must be empty and it will be - generated in the format of: projects/project\_number/feeds/feed\_id + feed (Union[dict, ~google.cloud.asset_v1p2beta1.types.Feed]): Required. The feed details. The field ``name`` must be empty and it will + be generated in the format of: projects/project\_number/feeds/feed\_id folders/folder\_number/feeds/feed\_id organizations/organization\_number/feeds/feed\_id @@ -544,7 +305,7 @@ def get_feed( >>> response = client.get_feed(name) Args: - name (str): The name of the Feed and it must be in the format of: + name (str): Required. The name of the Feed and it must be in the format of: projects/project\_number/feeds/feed\_id folders/folder\_number/feeds/feed\_id organizations/organization\_number/feeds/feed\_id @@ -693,17 +454,17 @@ def update_feed( >>> response = client.update_feed(feed, update_mask) Args: - feed (Union[dict, ~google.cloud.asset_v1p2beta1.types.Feed]): The new values of feed details. It must match an existing feed and the - field ``name`` must be in the format of: + feed (Union[dict, ~google.cloud.asset_v1p2beta1.types.Feed]): Required. The new values of feed details. It must match an existing feed + and the field ``name`` must be in the format of: projects/project\_number/feeds/feed\_id or folders/folder\_number/feeds/feed\_id or organizations/organization\_number/feeds/feed\_id. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.asset_v1p2beta1.types.Feed` - update_mask (Union[dict, ~google.cloud.asset_v1p2beta1.types.FieldMask]): Only updates the ``feed`` fields indicated by this mask. The field mask - must not be empty, and it must not contain fields that are immutable or - only set by the server. + update_mask (Union[dict, ~google.cloud.asset_v1p2beta1.types.FieldMask]): Required. Only updates the ``feed`` fields indicated by this mask. The + field mask must not be empty, and it must not contain fields that are + immutable or only set by the server. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.asset_v1p2beta1.types.FieldMask` @@ -777,7 +538,7 @@ def delete_feed( >>> client.delete_feed(name) Args: - name (str): The name of the feed and it must be in the format of: + name (str): Required. The name of the feed and it must be in the format of: projects/project\_number/feeds/feed\_id folders/folder\_number/feeds/feed\_id organizations/organization\_number/feeds/feed\_id diff --git a/asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client_config.py b/asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client_config.py index f3eab9e21e3b..d5bb677549a8 100644 --- a/asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client_config.py +++ b/asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client_config.py @@ -17,16 +17,6 @@ } }, "methods": { - "ExportAssets": { - "timeout_millis": 600000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, - "BatchGetAssetsHistory": { - "timeout_millis": 600000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, "CreateFeed": { "timeout_millis": 30000, "retry_codes_name": "non_idempotent", diff --git a/asset/google/cloud/asset_v1p2beta1/gapic/enums.py b/asset/google/cloud/asset_v1p2beta1/gapic/enums.py index 89cf639fe6bb..2b6e94cebcd5 100644 --- a/asset/google/cloud/asset_v1p2beta1/gapic/enums.py +++ b/asset/google/cloud/asset_v1p2beta1/gapic/enums.py @@ -27,28 +27,8 @@ class ContentType(enum.IntEnum): CONTENT_TYPE_UNSPECIFIED (int): Unspecified content type. RESOURCE (int): Resource metadata. IAM_POLICY (int): The actual IAM policy set on a resource. - IAM_POLICY_NAME (int): The IAM policy name for the IAM policy set on a resource. - ORG_POLICY (int) - ACCESS_POLICY (int): The Cloud Access context mananger Policy set on an asset. """ CONTENT_TYPE_UNSPECIFIED = 0 RESOURCE = 1 IAM_POLICY = 2 - IAM_POLICY_NAME = 3 - ORG_POLICY = 4 - ACCESS_POLICY = 5 - - -class NullValue(enum.IntEnum): - """ - ``NullValue`` is a singleton enumeration to represent the null value for - the ``Value`` type union. - - The JSON representation for ``NullValue`` is JSON ``null``. - - Attributes: - NULL_VALUE (int): Null value. - """ - - NULL_VALUE = 0 diff --git a/asset/google/cloud/asset_v1p2beta1/gapic/transports/asset_service_grpc_transport.py b/asset/google/cloud/asset_v1p2beta1/gapic/transports/asset_service_grpc_transport.py index f8b04073de29..1e81783bf76e 100644 --- a/asset/google/cloud/asset_v1p2beta1/gapic/transports/asset_service_grpc_transport.py +++ b/asset/google/cloud/asset_v1p2beta1/gapic/transports/asset_service_grpc_transport.py @@ -16,7 +16,6 @@ import google.api_core.grpc_helpers -import google.api_core.operations_v1 from google.cloud.asset_v1p2beta1.proto import asset_service_pb2_grpc @@ -76,13 +75,6 @@ def __init__( "asset_service_stub": asset_service_pb2_grpc.AssetServiceStub(channel) } - # Because this API includes a method that returns a - # long-running operation (proto: google.longrunning.Operation), - # instantiate an LRO client. - self._operations_client = google.api_core.operations_v1.OperationsClient( - channel - ) - @classmethod def create_channel( cls, address="cloudasset.googleapis.com:443", credentials=None, **kwargs @@ -115,39 +107,6 @@ def channel(self): """ return self._channel - @property - def export_assets(self): - """Return the gRPC stub for :meth:`AssetServiceClient.export_assets`. - - Exports assets with time and resource types to a given Cloud Storage - location. The output format is newline-delimited JSON. This API - implements the ``google.longrunning.Operation`` API allowing you to keep - track of the export. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["asset_service_stub"].ExportAssets - - @property - def batch_get_assets_history(self): - """Return the gRPC stub for :meth:`AssetServiceClient.batch_get_assets_history`. - - Batch gets the update history of assets that overlap a time window. For - RESOURCE content, this API outputs history with asset in both non-delete - or deleted status. For IAM\_POLICY content, this API outputs history - when the asset and its attached IAM POLICY both exist. This can create - gaps in the output history. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["asset_service_stub"].BatchGetAssetsHistory - @property def create_feed(self): """Return the gRPC stub for :meth:`AssetServiceClient.create_feed`. diff --git a/asset/google/cloud/asset_v1p2beta1/proto/asset_service.proto b/asset/google/cloud/asset_v1p2beta1/proto/asset_service.proto index 0d461d0fa81c..7925bba68785 100644 --- a/asset/google/cloud/asset_v1p2beta1/proto/asset_service.proto +++ b/asset/google/cloud/asset_v1p2beta1/proto/asset_service.proto @@ -18,12 +18,14 @@ syntax = "proto3"; package google.cloud.asset.v1p2beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/asset/v1p2beta1/assets.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Asset.V1p2Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset"; @@ -37,28 +39,6 @@ service AssetService { option (google.api.default_host) = "cloudasset.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - // Exports assets with time and resource types to a given Cloud Storage - // location. The output format is newline-delimited JSON. - // This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you - // to keep track of the export. - rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1p2beta1/{parent=*/*}:exportAssets" - body: "*" - }; - } - - // Batch gets the update history of assets that overlap a time window. - // For RESOURCE content, this API outputs history with asset in both - // non-delete or deleted status. - // For IAM_POLICY content, this API outputs history when the asset and its - // attached IAM POLICY both exist. This can create gaps in the output history. - rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) returns (BatchGetAssetsHistoryResponse) { - option (google.api.http) = { - get: "/v1p2beta1/{parent=*/*}:batchGetAssetsHistory" - }; - } - // Creates a feed in a parent project/folder/organization to listen to its // asset updates. rpc CreateFeed(CreateFeedRequest) returns (Feed) { @@ -66,6 +46,7 @@ service AssetService { post: "/v1p2beta1/{parent=*/*}/feeds" body: "*" }; + option (google.api.method_signature) = "parent"; } // Gets details about an asset feed. @@ -73,6 +54,7 @@ service AssetService { option (google.api.http) = { get: "/v1p2beta1/{name=*/*/feeds/*}" }; + option (google.api.method_signature) = "name"; } // Lists all asset feeds in a parent project/folder/organization. @@ -80,6 +62,7 @@ service AssetService { option (google.api.http) = { get: "/v1p2beta1/{parent=*/*}/feeds" }; + option (google.api.method_signature) = "parent"; } // Updates an asset feed configuration. @@ -88,6 +71,7 @@ service AssetService { patch: "/v1p2beta1/{feed.name=*/*/feeds/*}" body: "*" }; + option (google.api.method_signature) = "feed"; } // Deletes an asset feed. @@ -95,88 +79,10 @@ service AssetService { option (google.api.http) = { delete: "/v1p2beta1/{name=*/*/feeds/*}" }; + option (google.api.method_signature) = "name"; } } -// Export asset request. -message ExportAssetsRequest { - // Required. The relative name of the root asset. This can only be an - // organization number (such as "organizations/123"), a project ID (such as - // "projects/my-project-id"), or a project number (such as "projects/12345"). - string parent = 1; - - // Timestamp to take an asset snapshot. This can only be set to a timestamp - // between 2018-10-02 UTC (inclusive) and the current time. If not specified, - // the current time will be used. Due to delays in resource data collection - // and indexing, there is a volatile window during which running the same - // query may get different results. - google.protobuf.Timestamp read_time = 2; - - // A list of asset types of which to take a snapshot for. For example: - // "compute.googleapis.com/Disk". If specified, only matching assets will be - // returned. See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) - // for all supported asset types. - repeated string asset_types = 3; - - // Asset content type. If not specified, no content but the asset name will be - // returned. - ContentType content_type = 4; - - // Required. Output configuration indicating where the results will be output - // to. All results will be in newline delimited JSON format. - OutputConfig output_config = 5; -} - -// The export asset response. This message is returned by the -// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned -// [google.longrunning.Operation.response][google.longrunning.Operation.response] field. -message ExportAssetsResponse { - // Time the snapshot was taken. - google.protobuf.Timestamp read_time = 1; - - // Output configuration indicating where the results were output to. - // All results are in JSON format. - OutputConfig output_config = 2; -} - -// Batch get assets history request. -message BatchGetAssetsHistoryRequest { - // Required. The relative name of the root asset. It can only be an - // organization number (such as "organizations/123"), a project ID (such as - // "projects/my-project-id")", or a project number (such as "projects/12345"). - string parent = 1; - - // A list of the full names of the assets. For example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - // See [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // and [Resource Name - // Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) - // for more info. - // - // The request becomes a no-op if the asset name list is empty, and the max - // size of the asset name list is 100 in one request. - repeated string asset_names = 2; - - // Required. The content type. - ContentType content_type = 3; - - // Optional. The time window for the asset history. Both start_time and - // end_time are optional and if set, it must be after 2018-10-02 UTC. If - // end_time is not set, it is default to current timestamp. If start_time is - // not set, the snapshot of the assets at end_time will be returned. The - // returned results contain all temporal assets whose time window overlap with - // read_time_window. - TimeWindow read_time_window = 4; -} - -// Batch get assets history response. -message BatchGetAssetsHistoryResponse { - // A list of assets with valid time windows. - repeated TemporalAsset assets = 1; -} - // Create asset feed request. message CreateFeedRequest { // Required. The name of the project/folder/organization where this feed @@ -184,27 +90,32 @@ message CreateFeedRequest { // "organizations/123"), a folder number (such as "folders/123"), a project ID // (such as "projects/my-project-id")", or a project number (such as // "projects/12345"). - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; // Required. This is the client-assigned asset feed identifier and it needs to // be unique under a specific parent project/folder/organization. - string feed_id = 2; + string feed_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The feed details. The field `name` must be empty and it will be generated + // Required. The feed details. The field `name` must be empty and it will be generated // in the format of: // projects/project_number/feeds/feed_id // folders/folder_number/feeds/feed_id // organizations/organization_number/feeds/feed_id - Feed feed = 3; + Feed feed = 3 [(google.api.field_behavior) = REQUIRED]; } // Get asset feed request. message GetFeedRequest { - // The name of the Feed and it must be in the format of: + // Required. The name of the Feed and it must be in the format of: // projects/project_number/feeds/feed_id // folders/folder_number/feeds/feed_id // organizations/organization_number/feeds/feed_id - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Feed" + } + ]; } // List asset feeds request. @@ -212,10 +123,9 @@ message ListFeedsRequest { // Required. The parent project/folder/organization whose feeds are to be // listed. It can only be using project/folder/organization number (such as // "folders/12345")", or a project ID (such as "projects/my-project-id"). - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; } -// List asset feeds response. message ListFeedsResponse { // A list of feeds. repeated Feed feeds = 1; @@ -223,26 +133,30 @@ message ListFeedsResponse { // Update asset feed request. message UpdateFeedRequest { - // The new values of feed details. It must match an existing feed and the + // Required. The new values of feed details. It must match an existing feed and the // field `name` must be in the format of: // projects/project_number/feeds/feed_id or // folders/folder_number/feeds/feed_id or // organizations/organization_number/feeds/feed_id. - Feed feed = 1; + Feed feed = 1 [(google.api.field_behavior) = REQUIRED]; - // Only updates the `feed` fields indicated by this mask. + // Required. Only updates the `feed` fields indicated by this mask. // The field mask must not be empty, and it must not contain fields that // are immutable or only set by the server. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } -// Delete asset feed request. message DeleteFeedRequest { - // The name of the feed and it must be in the format of: + // Required. The name of the feed and it must be in the format of: // projects/project_number/feeds/feed_id // folders/folder_number/feeds/feed_id // organizations/organization_number/feeds/feed_id - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Feed" + } + ]; } // Output configuration for export assets destination. @@ -251,12 +165,6 @@ message OutputConfig { oneof destination { // Destination on Cloud Storage. GcsDestination gcs_destination = 1; - - // Destination on Bigquery. The output table stores the fields in asset - // proto as columns in BigQuery. The resource/iam_policy field is converted - // to a record with each field to a column, except metadata to a single JSON - // string. - BigQueryDestination bigquery_destination = 2; } } @@ -270,40 +178,9 @@ message GcsDestination { // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) // for more information. string uri = 1; - - // The uri prefix of all generated Cloud Storage objects. For example: - // "gs://bucket_name/object_name_prefix". Each object uri is in format: - // "gs://bucket_name/object_name_prefix// and only - // contains assets for that type. starts from 0. For example: - // "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is - // the first shard of output objects containing all - // compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be - // returned if file with the same name "gs://bucket_name/object_name_prefix" - // already exists. - string uri_prefix = 2; } } -// A Bigquery destination. -message BigQueryDestination { - // Required. The BigQuery dataset in format - // "projects/projectId/datasets/datasetId", to which the snapshot result - // should be exported. If this dataset does not exist, the export call returns - // an error. - string dataset = 1; - - // Required. The BigQuery table to which the snapshot result should be - // written. If this table does not exist, a new table with the given name - // will be created. - string table = 2; - - // If the destination table already exists and this flag is `TRUE`, the - // table will be overwritten by the contents of assets snapshot. If the flag - // is not set and the destination table already exists, the export call - // returns an error. - bool force = 3; -} - // A Cloud Pubsub destination. message PubsubDestination { // The name of the Cloud Pub/Sub topic to publish to. @@ -311,26 +188,6 @@ message PubsubDestination { string topic = 1; } -// Asset content type. -enum ContentType { - // Unspecified content type. - CONTENT_TYPE_UNSPECIFIED = 0; - - // Resource metadata. - RESOURCE = 1; - - // The actual IAM policy set on a resource. - IAM_POLICY = 2; - - // The IAM policy name for the IAM policy set on a resource. - IAM_POLICY_NAME = 3; - - ORG_POLICY = 4; - - // The Cloud Access context mananger Policy set on an asset. - ACCESS_POLICY = 5; -} - // Output configuration for asset feed destination. message FeedOutputConfig { // Asset feed destination. @@ -346,6 +203,14 @@ message FeedOutputConfig { // folder. Supported destinations are: // Cloud Pub/Sub topics. message Feed { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Feed" + pattern: "projects/{project}/feeds/{feed}" + pattern: "folders/{folder}/feeds/{feed}" + pattern: "organizations/{organization}/feeds/{feed}" + history: ORIGINALLY_SINGLE_PATTERN + }; + // Required. The format will be // projects/{project_number}/feeds/{client-assigned_feed_identifier} or // folders/{folder_number}/feeds/{client-assigned_feed_identifier} or @@ -353,7 +218,7 @@ message Feed { // // The client-assigned feed identifier must be unique within the parent // project/folder/organization. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // A list of the full names of the assets to receive updates. You must specify // either or both of asset_names and asset_types. Only asset updates matching @@ -380,5 +245,17 @@ message Feed { // Required. Feed output configuration defining where the asset updates are // published to. - FeedOutputConfig feed_output_config = 5; + FeedOutputConfig feed_output_config = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// Asset content type. +enum ContentType { + // Unspecified content type. + CONTENT_TYPE_UNSPECIFIED = 0; + + // Resource metadata. + RESOURCE = 1; + + // The actual IAM policy set on a resource. + IAM_POLICY = 2; } diff --git a/asset/google/cloud/asset_v1p2beta1/proto/asset_service_pb2.py b/asset/google/cloud/asset_v1p2beta1/proto/asset_service_pb2.py index 535e84ee1e67..4a97fd76c166 100644 --- a/asset/google/cloud/asset_v1p2beta1/proto/asset_service_pb2.py +++ b/asset/google/cloud/asset_v1p2beta1/proto/asset_service_pb2.py @@ -17,6 +17,9 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.asset_v1p2beta1.proto import ( assets_pb2 as google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_assets__pb2, ) @@ -26,7 +29,6 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -37,16 +39,18 @@ "\n com.google.cloud.asset.v1p2beta1B\021AssetServiceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset\252\002\034Google.Cloud.Asset.V1p2Beta1\312\002\034Google\\Cloud\\Asset\\V1p2Beta1" ), serialized_pb=_b( - '\n6google/cloud/asset_v1p2beta1/proto/asset_service.proto\x12\x1cgoogle.cloud.asset.v1p2beta1\x1a\x1cgoogle/api/annotations.proto\x1a/google/cloud/asset_v1p2beta1/proto/assets.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/api/client.proto"\xed\x01\n\x13\x45xportAssetsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12?\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32).google.cloud.asset.v1p2beta1.ContentType\x12\x41\n\routput_config\x18\x05 \x01(\x0b\x32*.google.cloud.asset.v1p2beta1.OutputConfig"\x88\x01\n\x14\x45xportAssetsResponse\x12-\n\tread_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\routput_config\x18\x02 \x01(\x0b\x32*.google.cloud.asset.v1p2beta1.OutputConfig"\xc8\x01\n\x1c\x42\x61tchGetAssetsHistoryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12?\n\x0c\x63ontent_type\x18\x03 \x01(\x0e\x32).google.cloud.asset.v1p2beta1.ContentType\x12\x42\n\x10read_time_window\x18\x04 \x01(\x0b\x32(.google.cloud.asset.v1p2beta1.TimeWindow"\\\n\x1d\x42\x61tchGetAssetsHistoryResponse\x12;\n\x06\x61ssets\x18\x01 \x03(\x0b\x32+.google.cloud.asset.v1p2beta1.TemporalAsset"f\n\x11\x43reateFeedRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0f\n\x07\x66\x65\x65\x64_id\x18\x02 \x01(\t\x12\x30\n\x04\x66\x65\x65\x64\x18\x03 \x01(\x0b\x32".google.cloud.asset.v1p2beta1.Feed"\x1e\n\x0eGetFeedRequest\x12\x0c\n\x04name\x18\x01 \x01(\t""\n\x10ListFeedsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t"F\n\x11ListFeedsResponse\x12\x31\n\x05\x66\x65\x65\x64s\x18\x01 \x03(\x0b\x32".google.cloud.asset.v1p2beta1.Feed"v\n\x11UpdateFeedRequest\x12\x30\n\x04\x66\x65\x65\x64\x18\x01 \x01(\x0b\x32".google.cloud.asset.v1p2beta1.Feed\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"!\n\x11\x44\x65leteFeedRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\xb9\x01\n\x0cOutputConfig\x12G\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32,.google.cloud.asset.v1p2beta1.GcsDestinationH\x00\x12Q\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x31.google.cloud.asset.v1p2beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination"C\n\x0eGcsDestination\x12\r\n\x03uri\x18\x01 \x01(\tH\x00\x12\x14\n\nuri_prefix\x18\x02 \x01(\tH\x00\x42\x0c\n\nobject_uri"D\n\x13\x42igQueryDestination\x12\x0f\n\x07\x64\x61taset\x18\x01 \x01(\t\x12\r\n\x05table\x18\x02 \x01(\t\x12\r\n\x05\x66orce\x18\x03 \x01(\x08""\n\x11PubsubDestination\x12\r\n\x05topic\x18\x01 \x01(\t"p\n\x10\x46\x65\x65\x64OutputConfig\x12M\n\x12pubsub_destination\x18\x01 \x01(\x0b\x32/.google.cloud.asset.v1p2beta1.PubsubDestinationH\x00\x42\r\n\x0b\x64\x65stination"\xcb\x01\n\x04\x46\x65\x65\x64\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12?\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32).google.cloud.asset.v1p2beta1.ContentType\x12J\n\x12\x66\x65\x65\x64_output_config\x18\x05 \x01(\x0b\x32..google.cloud.asset.v1p2beta1.FeedOutputConfig*\x81\x01\n\x0b\x43ontentType\x12\x1c\n\x18\x43ONTENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOURCE\x10\x01\x12\x0e\n\nIAM_POLICY\x10\x02\x12\x13\n\x0fIAM_POLICY_NAME\x10\x03\x12\x0e\n\nORG_POLICY\x10\x04\x12\x11\n\rACCESS_POLICY\x10\x05\x32\xf5\x08\n\x0c\x41ssetService\x12\x91\x01\n\x0c\x45xportAssets\x12\x31.google.cloud.asset.v1p2beta1.ExportAssetsRequest\x1a\x1d.google.longrunning.Operation"/\x82\xd3\xe4\x93\x02)"$/v1p2beta1/{parent=*/*}:exportAssets:\x01*\x12\xc7\x01\n\x15\x42\x61tchGetAssetsHistory\x12:.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest\x1a;.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse"5\x82\xd3\xe4\x93\x02/\x12-/v1p2beta1/{parent=*/*}:batchGetAssetsHistory\x12\x8b\x01\n\nCreateFeed\x12/.google.cloud.asset.v1p2beta1.CreateFeedRequest\x1a".google.cloud.asset.v1p2beta1.Feed"(\x82\xd3\xe4\x93\x02""\x1d/v1p2beta1/{parent=*/*}/feeds:\x01*\x12\x82\x01\n\x07GetFeed\x12,.google.cloud.asset.v1p2beta1.GetFeedRequest\x1a".google.cloud.asset.v1p2beta1.Feed"%\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1p2beta1/{name=*/*/feeds/*}\x12\x93\x01\n\tListFeeds\x12..google.cloud.asset.v1p2beta1.ListFeedsRequest\x1a/.google.cloud.asset.v1p2beta1.ListFeedsResponse"%\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1p2beta1/{parent=*/*}/feeds\x12\x90\x01\n\nUpdateFeed\x12/.google.cloud.asset.v1p2beta1.UpdateFeedRequest\x1a".google.cloud.asset.v1p2beta1.Feed"-\x82\xd3\xe4\x93\x02\'2"/v1p2beta1/{feed.name=*/*/feeds/*}:\x01*\x12|\n\nDeleteFeed\x12/.google.cloud.asset.v1p2beta1.DeleteFeedRequest\x1a\x16.google.protobuf.Empty"%\x82\xd3\xe4\x93\x02\x1f*\x1d/v1p2beta1/{name=*/*/feeds/*}\x1aM\xca\x41\x19\x63loudasset.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x01\n com.google.cloud.asset.v1p2beta1B\x11\x41ssetServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset\xaa\x02\x1cGoogle.Cloud.Asset.V1p2Beta1\xca\x02\x1cGoogle\\Cloud\\Asset\\V1p2Beta1b\x06proto3' + '\n6google/cloud/asset_v1p2beta1/proto/asset_service.proto\x12\x1cgoogle.cloud.asset.v1p2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/asset_v1p2beta1/proto/assets.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto"u\n\x11\x43reateFeedRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x66\x65\x65\x64_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x35\n\x04\x66\x65\x65\x64\x18\x03 \x01(\x0b\x32".google.cloud.asset.v1p2beta1.FeedB\x03\xe0\x41\x02"F\n\x0eGetFeedRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudasset.googleapis.com/Feed"\'\n\x10ListFeedsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02"F\n\x11ListFeedsResponse\x12\x31\n\x05\x66\x65\x65\x64s\x18\x01 \x03(\x0b\x32".google.cloud.asset.v1p2beta1.Feed"\x80\x01\n\x11UpdateFeedRequest\x12\x35\n\x04\x66\x65\x65\x64\x18\x01 \x01(\x0b\x32".google.cloud.asset.v1p2beta1.FeedB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"I\n\x11\x44\x65leteFeedRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudasset.googleapis.com/Feed"f\n\x0cOutputConfig\x12G\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32,.google.cloud.asset.v1p2beta1.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"-\n\x0eGcsDestination\x12\r\n\x03uri\x18\x01 \x01(\tH\x00\x42\x0c\n\nobject_uri""\n\x11PubsubDestination\x12\r\n\x05topic\x18\x01 \x01(\t"p\n\x10\x46\x65\x65\x64OutputConfig\x12M\n\x12pubsub_destination\x18\x01 \x01(\x0b\x32/.google.cloud.asset.v1p2beta1.PubsubDestinationH\x00\x42\r\n\x0b\x64\x65stination"\xe9\x02\n\x04\x46\x65\x65\x64\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x61sset_names\x18\x02 \x03(\t\x12\x13\n\x0b\x61sset_types\x18\x03 \x03(\t\x12?\n\x0c\x63ontent_type\x18\x04 \x01(\x0e\x32).google.cloud.asset.v1p2beta1.ContentType\x12O\n\x12\x66\x65\x65\x64_output_config\x18\x05 \x01(\x0b\x32..google.cloud.asset.v1p2beta1.FeedOutputConfigB\x03\xe0\x41\x02:\x91\x01\xea\x41\x8d\x01\n\x1e\x63loudasset.googleapis.com/Feed\x12\x1fprojects/{project}/feeds/{feed}\x12\x1d\x66olders/{folder}/feeds/{feed}\x12)organizations/{organization}/feeds/{feed} \x01*I\n\x0b\x43ontentType\x12\x1c\n\x18\x43ONTENT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOURCE\x10\x01\x12\x0e\n\nIAM_POLICY\x10\x02\x32\xbf\x06\n\x0c\x41ssetService\x12\x94\x01\n\nCreateFeed\x12/.google.cloud.asset.v1p2beta1.CreateFeedRequest\x1a".google.cloud.asset.v1p2beta1.Feed"1\x82\xd3\xe4\x93\x02""\x1d/v1p2beta1/{parent=*/*}/feeds:\x01*\xda\x41\x06parent\x12\x89\x01\n\x07GetFeed\x12,.google.cloud.asset.v1p2beta1.GetFeedRequest\x1a".google.cloud.asset.v1p2beta1.Feed",\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1p2beta1/{name=*/*/feeds/*}\xda\x41\x04name\x12\x9c\x01\n\tListFeeds\x12..google.cloud.asset.v1p2beta1.ListFeedsRequest\x1a/.google.cloud.asset.v1p2beta1.ListFeedsResponse".\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1p2beta1/{parent=*/*}/feeds\xda\x41\x06parent\x12\x97\x01\n\nUpdateFeed\x12/.google.cloud.asset.v1p2beta1.UpdateFeedRequest\x1a".google.cloud.asset.v1p2beta1.Feed"4\x82\xd3\xe4\x93\x02\'2"/v1p2beta1/{feed.name=*/*/feeds/*}:\x01*\xda\x41\x04\x66\x65\x65\x64\x12\x83\x01\n\nDeleteFeed\x12/.google.cloud.asset.v1p2beta1.DeleteFeedRequest\x1a\x16.google.protobuf.Empty",\x82\xd3\xe4\x93\x02\x1f*\x1d/v1p2beta1/{name=*/*/feeds/*}\xda\x41\x04name\x1aM\xca\x41\x19\x63loudasset.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x01\n com.google.cloud.asset.v1p2beta1B\x11\x41ssetServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset\xaa\x02\x1cGoogle.Cloud.Asset.V1p2Beta1\xca\x02\x1cGoogle\\Cloud\\Asset\\V1p2Beta1b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_assets__pb2.DESCRIPTOR, google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -69,24 +73,11 @@ _descriptor.EnumValueDescriptor( name="IAM_POLICY", index=2, number=2, serialized_options=None, type=None ), - _descriptor.EnumValueDescriptor( - name="IAM_POLICY_NAME", - index=3, - number=3, - serialized_options=None, - type=None, - ), - _descriptor.EnumValueDescriptor( - name="ORG_POLICY", index=4, number=4, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="ACCESS_POLICY", index=5, number=5, serialized_options=None, type=None - ), ], containing_type=None, serialized_options=None, - serialized_start=2084, - serialized_end=2213, + serialized_start=1560, + serialized_end=1633, ) _sym_db.RegisterEnumDescriptor(_CONTENTTYPE) @@ -94,309 +85,6 @@ CONTENT_TYPE_UNSPECIFIED = 0 RESOURCE = 1 IAM_POLICY = 2 -IAM_POLICY_NAME = 3 -ORG_POLICY = 4 -ACCESS_POLICY = 5 - - -_EXPORTASSETSREQUEST = _descriptor.Descriptor( - name="ExportAssetsRequest", - full_name="google.cloud.asset.v1p2beta1.ExportAssetsRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.cloud.asset.v1p2beta1.ExportAssetsRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="read_time", - full_name="google.cloud.asset.v1p2beta1.ExportAssetsRequest.read_time", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="asset_types", - full_name="google.cloud.asset.v1p2beta1.ExportAssetsRequest.asset_types", - index=2, - number=3, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="content_type", - full_name="google.cloud.asset.v1p2beta1.ExportAssetsRequest.content_type", - index=3, - number=4, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="output_config", - full_name="google.cloud.asset.v1p2beta1.ExportAssetsRequest.output_config", - index=4, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=326, - serialized_end=563, -) - - -_EXPORTASSETSRESPONSE = _descriptor.Descriptor( - name="ExportAssetsResponse", - full_name="google.cloud.asset.v1p2beta1.ExportAssetsResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="read_time", - full_name="google.cloud.asset.v1p2beta1.ExportAssetsResponse.read_time", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="output_config", - full_name="google.cloud.asset.v1p2beta1.ExportAssetsResponse.output_config", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=566, - serialized_end=702, -) - - -_BATCHGETASSETSHISTORYREQUEST = _descriptor.Descriptor( - name="BatchGetAssetsHistoryRequest", - full_name="google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="asset_names", - full_name="google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.asset_names", - index=1, - number=2, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="content_type", - full_name="google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.content_type", - index=2, - number=3, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="read_time_window", - full_name="google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.read_time_window", - index=3, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=705, - serialized_end=905, -) - - -_BATCHGETASSETSHISTORYRESPONSE = _descriptor.Descriptor( - name="BatchGetAssetsHistoryResponse", - full_name="google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="assets", - full_name="google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse.assets", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ) - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=907, - serialized_end=999, -) _CREATEFEEDREQUEST = _descriptor.Descriptor( @@ -421,7 +109,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -439,7 +127,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -457,7 +145,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -469,8 +157,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1001, - serialized_end=1103, + serialized_start=385, + serialized_end=502, ) @@ -496,7 +184,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A \n\036cloudasset.googleapis.com/Feed" + ), file=DESCRIPTOR, ) ], @@ -508,8 +198,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1105, - serialized_end=1135, + serialized_start=504, + serialized_end=574, ) @@ -535,7 +225,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -547,8 +237,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1137, - serialized_end=1171, + serialized_start=576, + serialized_end=615, ) @@ -586,8 +276,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1173, - serialized_end=1243, + serialized_start=617, + serialized_end=687, ) @@ -613,7 +303,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -631,7 +321,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -643,8 +333,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1245, - serialized_end=1363, + serialized_start=690, + serialized_end=818, ) @@ -670,7 +360,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A \n\036cloudasset.googleapis.com/Feed" + ), file=DESCRIPTOR, ) ], @@ -682,8 +374,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1365, - serialized_end=1398, + serialized_start=820, + serialized_end=893, ) @@ -711,25 +403,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="bigquery_destination", - full_name="google.cloud.asset.v1p2beta1.OutputConfig.bigquery_destination", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -747,8 +421,8 @@ fields=[], ) ], - serialized_start=1401, - serialized_end=1586, + serialized_start=895, + serialized_end=997, ) @@ -776,25 +450,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="uri_prefix", - full_name="google.cloud.asset.v1p2beta1.GcsDestination.uri_prefix", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -812,83 +468,8 @@ fields=[], ) ], - serialized_start=1588, - serialized_end=1655, -) - - -_BIGQUERYDESTINATION = _descriptor.Descriptor( - name="BigQueryDestination", - full_name="google.cloud.asset.v1p2beta1.BigQueryDestination", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="dataset", - full_name="google.cloud.asset.v1p2beta1.BigQueryDestination.dataset", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="table", - full_name="google.cloud.asset.v1p2beta1.BigQueryDestination.table", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="force", - full_name="google.cloud.asset.v1p2beta1.BigQueryDestination.force", - index=2, - number=3, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1657, - serialized_end=1725, + serialized_start=999, + serialized_end=1044, ) @@ -926,8 +507,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1727, - serialized_end=1761, + serialized_start=1046, + serialized_end=1080, ) @@ -973,8 +554,8 @@ fields=[], ) ], - serialized_start=1763, - serialized_end=1875, + serialized_start=1082, + serialized_end=1194, ) @@ -1000,7 +581,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1072,42 +653,24 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352A\215\001\n\036cloudasset.googleapis.com/Feed\022\037projects/{project}/feeds/{feed}\022\035folders/{folder}/feeds/{feed}\022)organizations/{organization}/feeds/{feed} \001" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1878, - serialized_end=2081, + serialized_start=1197, + serialized_end=1558, ) -_EXPORTASSETSREQUEST.fields_by_name[ - "read_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_EXPORTASSETSREQUEST.fields_by_name["content_type"].enum_type = _CONTENTTYPE -_EXPORTASSETSREQUEST.fields_by_name["output_config"].message_type = _OUTPUTCONFIG -_EXPORTASSETSRESPONSE.fields_by_name[ - "read_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_EXPORTASSETSRESPONSE.fields_by_name["output_config"].message_type = _OUTPUTCONFIG -_BATCHGETASSETSHISTORYREQUEST.fields_by_name["content_type"].enum_type = _CONTENTTYPE -_BATCHGETASSETSHISTORYREQUEST.fields_by_name[ - "read_time_window" -].message_type = ( - google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_assets__pb2._TIMEWINDOW -) -_BATCHGETASSETSHISTORYRESPONSE.fields_by_name[ - "assets" -].message_type = ( - google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_assets__pb2._TEMPORALASSET -) _CREATEFEEDREQUEST.fields_by_name["feed"].message_type = _FEED _LISTFEEDSRESPONSE.fields_by_name["feeds"].message_type = _FEED _UPDATEFEEDREQUEST.fields_by_name["feed"].message_type = _FEED @@ -1115,31 +678,18 @@ "update_mask" ].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK _OUTPUTCONFIG.fields_by_name["gcs_destination"].message_type = _GCSDESTINATION -_OUTPUTCONFIG.fields_by_name["bigquery_destination"].message_type = _BIGQUERYDESTINATION _OUTPUTCONFIG.oneofs_by_name["destination"].fields.append( _OUTPUTCONFIG.fields_by_name["gcs_destination"] ) _OUTPUTCONFIG.fields_by_name[ "gcs_destination" ].containing_oneof = _OUTPUTCONFIG.oneofs_by_name["destination"] -_OUTPUTCONFIG.oneofs_by_name["destination"].fields.append( - _OUTPUTCONFIG.fields_by_name["bigquery_destination"] -) -_OUTPUTCONFIG.fields_by_name[ - "bigquery_destination" -].containing_oneof = _OUTPUTCONFIG.oneofs_by_name["destination"] _GCSDESTINATION.oneofs_by_name["object_uri"].fields.append( _GCSDESTINATION.fields_by_name["uri"] ) _GCSDESTINATION.fields_by_name["uri"].containing_oneof = _GCSDESTINATION.oneofs_by_name[ "object_uri" ] -_GCSDESTINATION.oneofs_by_name["object_uri"].fields.append( - _GCSDESTINATION.fields_by_name["uri_prefix"] -) -_GCSDESTINATION.fields_by_name[ - "uri_prefix" -].containing_oneof = _GCSDESTINATION.oneofs_by_name["object_uri"] _FEEDOUTPUTCONFIG.fields_by_name["pubsub_destination"].message_type = _PUBSUBDESTINATION _FEEDOUTPUTCONFIG.oneofs_by_name["destination"].fields.append( _FEEDOUTPUTCONFIG.fields_by_name["pubsub_destination"] @@ -1149,14 +699,6 @@ ].containing_oneof = _FEEDOUTPUTCONFIG.oneofs_by_name["destination"] _FEED.fields_by_name["content_type"].enum_type = _CONTENTTYPE _FEED.fields_by_name["feed_output_config"].message_type = _FEEDOUTPUTCONFIG -DESCRIPTOR.message_types_by_name["ExportAssetsRequest"] = _EXPORTASSETSREQUEST -DESCRIPTOR.message_types_by_name["ExportAssetsResponse"] = _EXPORTASSETSRESPONSE -DESCRIPTOR.message_types_by_name[ - "BatchGetAssetsHistoryRequest" -] = _BATCHGETASSETSHISTORYREQUEST -DESCRIPTOR.message_types_by_name[ - "BatchGetAssetsHistoryResponse" -] = _BATCHGETASSETSHISTORYRESPONSE DESCRIPTOR.message_types_by_name["CreateFeedRequest"] = _CREATEFEEDREQUEST DESCRIPTOR.message_types_by_name["GetFeedRequest"] = _GETFEEDREQUEST DESCRIPTOR.message_types_by_name["ListFeedsRequest"] = _LISTFEEDSREQUEST @@ -1165,139 +707,12 @@ DESCRIPTOR.message_types_by_name["DeleteFeedRequest"] = _DELETEFEEDREQUEST DESCRIPTOR.message_types_by_name["OutputConfig"] = _OUTPUTCONFIG DESCRIPTOR.message_types_by_name["GcsDestination"] = _GCSDESTINATION -DESCRIPTOR.message_types_by_name["BigQueryDestination"] = _BIGQUERYDESTINATION DESCRIPTOR.message_types_by_name["PubsubDestination"] = _PUBSUBDESTINATION DESCRIPTOR.message_types_by_name["FeedOutputConfig"] = _FEEDOUTPUTCONFIG DESCRIPTOR.message_types_by_name["Feed"] = _FEED DESCRIPTOR.enum_types_by_name["ContentType"] = _CONTENTTYPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -ExportAssetsRequest = _reflection.GeneratedProtocolMessageType( - "ExportAssetsRequest", - (_message.Message,), - dict( - DESCRIPTOR=_EXPORTASSETSREQUEST, - __module__="google.cloud.asset_v1p2beta1.proto.asset_service_pb2", - __doc__="""Export asset request. - - - Attributes: - parent: - Required. The relative name of the root asset. This can only - be an organization number (such as "organizations/123"), a - project ID (such as "projects/my-project-id"), or a project - number (such as "projects/12345"). - read_time: - Timestamp to take an asset snapshot. This can only be set to a - timestamp between 2018-10-02 UTC (inclusive) and the current - time. If not specified, the current time will be used. Due to - delays in resource data collection and indexing, there is a - volatile window during which running the same query may get - different results. - asset_types: - A list of asset types of which to take a snapshot for. For - example: "compute.googleapis.com/Disk". If specified, only - matching assets will be returned. See `Introduction to Cloud - Asset Inventory `__ for all - supported asset types. - content_type: - Asset content type. If not specified, no content but the asset - name will be returned. - output_config: - Required. Output configuration indicating where the results - will be output to. All results will be in newline delimited - JSON format. - """, - # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.ExportAssetsRequest) - ), -) -_sym_db.RegisterMessage(ExportAssetsRequest) - -ExportAssetsResponse = _reflection.GeneratedProtocolMessageType( - "ExportAssetsResponse", - (_message.Message,), - dict( - DESCRIPTOR=_EXPORTASSETSRESPONSE, - __module__="google.cloud.asset_v1p2beta1.proto.asset_service_pb2", - __doc__="""The export asset response. This message is returned by the - [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] - method in the returned - [google.longrunning.Operation.response][google.longrunning.Operation.response] - field. - - - Attributes: - read_time: - Time the snapshot was taken. - output_config: - Output configuration indicating where the results were output - to. All results are in JSON format. - """, - # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.ExportAssetsResponse) - ), -) -_sym_db.RegisterMessage(ExportAssetsResponse) - -BatchGetAssetsHistoryRequest = _reflection.GeneratedProtocolMessageType( - "BatchGetAssetsHistoryRequest", - (_message.Message,), - dict( - DESCRIPTOR=_BATCHGETASSETSHISTORYREQUEST, - __module__="google.cloud.asset_v1p2beta1.proto.asset_service_pb2", - __doc__="""Batch get assets history request. - - - Attributes: - parent: - Required. The relative name of the root asset. It can only be - an organization number (such as "organizations/123"), a - project ID (such as "projects/my-project-id")", or a project - number (such as "projects/12345"). - asset_names: - A list of the full names of the assets. For example: ``//compu - te.googleapis.com/projects/my_project_123/zones/zone1/instance - s/instance1``. See `Resource Names `__ and `Resource - Name Format `__ - for more info. The request becomes a no-op if the asset name - list is empty, and the max size of the asset name list is 100 - in one request. - content_type: - Required. The content type. - read_time_window: - Optional. The time window for the asset history. Both - start\_time and end\_time are optional and if set, it must be - after 2018-10-02 UTC. If end\_time is not set, it is default - to current timestamp. If start\_time is not set, the snapshot - of the assets at end\_time will be returned. The returned - results contain all temporal assets whose time window overlap - with read\_time\_window. - """, - # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest) - ), -) -_sym_db.RegisterMessage(BatchGetAssetsHistoryRequest) - -BatchGetAssetsHistoryResponse = _reflection.GeneratedProtocolMessageType( - "BatchGetAssetsHistoryResponse", - (_message.Message,), - dict( - DESCRIPTOR=_BATCHGETASSETSHISTORYRESPONSE, - __module__="google.cloud.asset_v1p2beta1.proto.asset_service_pb2", - __doc__="""Batch get assets history response. - - - Attributes: - assets: - A list of assets with valid time windows. - """, - # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse) - ), -) -_sym_db.RegisterMessage(BatchGetAssetsHistoryResponse) - CreateFeedRequest = _reflection.GeneratedProtocolMessageType( "CreateFeedRequest", (_message.Message,), @@ -1319,8 +734,8 @@ and it needs to be unique under a specific parent project/folder/organization. feed: - The feed details. The field ``name`` must be empty and it will - be generated in the format of: + Required. The feed details. The field ``name`` must be empty + and it will be generated in the format of: projects/project\_number/feeds/feed\_id folders/folder\_number/feeds/feed\_id organizations/organization\_number/feeds/feed\_id @@ -1341,8 +756,8 @@ Attributes: name: - The name of the Feed and it must be in the format of: - projects/project\_number/feeds/feed\_id + Required. The name of the Feed and it must be in the format + of: projects/project\_number/feeds/feed\_id folders/folder\_number/feeds/feed\_id organizations/organization\_number/feeds/feed\_id """, @@ -1378,10 +793,8 @@ dict( DESCRIPTOR=_LISTFEEDSRESPONSE, __module__="google.cloud.asset_v1p2beta1.proto.asset_service_pb2", - __doc__="""List asset feeds response. - - - Attributes: + __doc__=""" + Attributes: feeds: A list of feeds. """, @@ -1401,15 +814,15 @@ Attributes: feed: - The new values of feed details. It must match an existing feed - and the field ``name`` must be in the format of: + Required. The new values of feed details. It must match an + existing feed and the field ``name`` must be in the format of: projects/project\_number/feeds/feed\_id or folders/folder\_number/feeds/feed\_id or organizations/organization\_number/feeds/feed\_id. update_mask: - Only updates the ``feed`` fields indicated by this mask. The - field mask must not be empty, and it must not contain fields - that are immutable or only set by the server. + Required. Only updates the ``feed`` fields indicated by this + mask. The field mask must not be empty, and it must not + contain fields that are immutable or only set by the server. """, # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.UpdateFeedRequest) ), @@ -1422,13 +835,11 @@ dict( DESCRIPTOR=_DELETEFEEDREQUEST, __module__="google.cloud.asset_v1p2beta1.proto.asset_service_pb2", - __doc__="""Delete asset feed request. - - - Attributes: + __doc__=""" + Attributes: name: - The name of the feed and it must be in the format of: - projects/project\_number/feeds/feed\_id + Required. The name of the feed and it must be in the format + of: projects/project\_number/feeds/feed\_id folders/folder\_number/feeds/feed\_id organizations/organization\_number/feeds/feed\_id """, @@ -1451,11 +862,6 @@ Asset export destination. gcs_destination: Destination on Cloud Storage. - bigquery_destination: - Destination on Bigquery. The output table stores the fields in - asset proto as columns in BigQuery. The resource/iam\_policy - field is converted to a record with each field to a column, - except metadata to a single JSON string. """, # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.OutputConfig) ), @@ -1480,52 +886,12 @@ See `Viewing and Editing Object Metadata `__ for more information. - uri_prefix: - The uri prefix of all generated Cloud Storage objects. For - example: "gs://bucket\_name/object\_name\_prefix". Each object - uri is in format: "gs://bucket\_name/object\_name\_prefix// - and only contains assets for that type. starts from 0. For - example: "gs://bucket\_name/object\_name\_prefix/compute.googl - eapis.com/Disk/0" is the first shard of output objects - containing all compute.googleapis.com/Disk assets. An - INVALID\_ARGUMENT error will be returned if file with the same - name "gs://bucket\_name/object\_name\_prefix" already exists. """, # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.GcsDestination) ), ) _sym_db.RegisterMessage(GcsDestination) -BigQueryDestination = _reflection.GeneratedProtocolMessageType( - "BigQueryDestination", - (_message.Message,), - dict( - DESCRIPTOR=_BIGQUERYDESTINATION, - __module__="google.cloud.asset_v1p2beta1.proto.asset_service_pb2", - __doc__="""A Bigquery destination. - - - Attributes: - dataset: - Required. The BigQuery dataset in format - "projects/projectId/datasets/datasetId", to which the snapshot - result should be exported. If this dataset does not exist, the - export call returns an error. - table: - Required. The BigQuery table to which the snapshot result - should be written. If this table does not exist, a new table - with the given name will be created. - force: - If the destination table already exists and this flag is - ``TRUE``, the table will be overwritten by the contents of - assets snapshot. If the flag is not set and the destination - table already exists, the export call returns an error. - """, - # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.BigQueryDestination) - ), -) -_sym_db.RegisterMessage(BigQueryDestination) - PubsubDestination = _reflection.GeneratedProtocolMessageType( "PubsubDestination", (_message.Message,), @@ -1619,6 +985,17 @@ DESCRIPTOR._options = None +_CREATEFEEDREQUEST.fields_by_name["parent"]._options = None +_CREATEFEEDREQUEST.fields_by_name["feed_id"]._options = None +_CREATEFEEDREQUEST.fields_by_name["feed"]._options = None +_GETFEEDREQUEST.fields_by_name["name"]._options = None +_LISTFEEDSREQUEST.fields_by_name["parent"]._options = None +_UPDATEFEEDREQUEST.fields_by_name["feed"]._options = None +_UPDATEFEEDREQUEST.fields_by_name["update_mask"]._options = None +_DELETEFEEDREQUEST.fields_by_name["name"]._options = None +_FEED.fields_by_name["name"]._options = None +_FEED.fields_by_name["feed_output_config"]._options = None +_FEED._options = None _ASSETSERVICE = _descriptor.ServiceDescriptor( name="AssetService", @@ -1628,84 +1005,62 @@ serialized_options=_b( "\312A\031cloudasset.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform" ), - serialized_start=2216, - serialized_end=3357, + serialized_start=1636, + serialized_end=2467, methods=[ - _descriptor.MethodDescriptor( - name="ExportAssets", - full_name="google.cloud.asset.v1p2beta1.AssetService.ExportAssets", - index=0, - containing_service=None, - input_type=_EXPORTASSETSREQUEST, - output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002)"$/v1p2beta1/{parent=*/*}:exportAssets:\001*' - ), - ), - _descriptor.MethodDescriptor( - name="BatchGetAssetsHistory", - full_name="google.cloud.asset.v1p2beta1.AssetService.BatchGetAssetsHistory", - index=1, - containing_service=None, - input_type=_BATCHGETASSETSHISTORYREQUEST, - output_type=_BATCHGETASSETSHISTORYRESPONSE, - serialized_options=_b( - "\202\323\344\223\002/\022-/v1p2beta1/{parent=*/*}:batchGetAssetsHistory" - ), - ), _descriptor.MethodDescriptor( name="CreateFeed", full_name="google.cloud.asset.v1p2beta1.AssetService.CreateFeed", - index=2, + index=0, containing_service=None, input_type=_CREATEFEEDREQUEST, output_type=_FEED, serialized_options=_b( - '\202\323\344\223\002""\035/v1p2beta1/{parent=*/*}/feeds:\001*' + '\202\323\344\223\002""\035/v1p2beta1/{parent=*/*}/feeds:\001*\332A\006parent' ), ), _descriptor.MethodDescriptor( name="GetFeed", full_name="google.cloud.asset.v1p2beta1.AssetService.GetFeed", - index=3, + index=1, containing_service=None, input_type=_GETFEEDREQUEST, output_type=_FEED, serialized_options=_b( - "\202\323\344\223\002\037\022\035/v1p2beta1/{name=*/*/feeds/*}" + "\202\323\344\223\002\037\022\035/v1p2beta1/{name=*/*/feeds/*}\332A\004name" ), ), _descriptor.MethodDescriptor( name="ListFeeds", full_name="google.cloud.asset.v1p2beta1.AssetService.ListFeeds", - index=4, + index=2, containing_service=None, input_type=_LISTFEEDSREQUEST, output_type=_LISTFEEDSRESPONSE, serialized_options=_b( - "\202\323\344\223\002\037\022\035/v1p2beta1/{parent=*/*}/feeds" + "\202\323\344\223\002\037\022\035/v1p2beta1/{parent=*/*}/feeds\332A\006parent" ), ), _descriptor.MethodDescriptor( name="UpdateFeed", full_name="google.cloud.asset.v1p2beta1.AssetService.UpdateFeed", - index=5, + index=3, containing_service=None, input_type=_UPDATEFEEDREQUEST, output_type=_FEED, serialized_options=_b( - "\202\323\344\223\002'2\"/v1p2beta1/{feed.name=*/*/feeds/*}:\001*" + "\202\323\344\223\002'2\"/v1p2beta1/{feed.name=*/*/feeds/*}:\001*\332A\004feed" ), ), _descriptor.MethodDescriptor( name="DeleteFeed", full_name="google.cloud.asset.v1p2beta1.AssetService.DeleteFeed", - index=6, + index=4, containing_service=None, input_type=_DELETEFEEDREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002\037*\035/v1p2beta1/{name=*/*/feeds/*}" + "\202\323\344\223\002\037*\035/v1p2beta1/{name=*/*/feeds/*}\332A\004name" ), ), ], diff --git a/asset/google/cloud/asset_v1p2beta1/proto/asset_service_pb2_grpc.py b/asset/google/cloud/asset_v1p2beta1/proto/asset_service_pb2_grpc.py index 05ec4e44be0f..04493683e5cc 100644 --- a/asset/google/cloud/asset_v1p2beta1/proto/asset_service_pb2_grpc.py +++ b/asset/google/cloud/asset_v1p2beta1/proto/asset_service_pb2_grpc.py @@ -4,9 +4,6 @@ from google.cloud.asset_v1p2beta1.proto import ( asset_service_pb2 as google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_asset__service__pb2, ) -from google.longrunning import ( - operations_pb2 as google_dot_longrunning_dot_operations__pb2, -) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 @@ -20,16 +17,6 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ - self.ExportAssets = channel.unary_unary( - "/google.cloud.asset.v1p2beta1.AssetService/ExportAssets", - request_serializer=google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_asset__service__pb2.ExportAssetsRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - self.BatchGetAssetsHistory = channel.unary_unary( - "/google.cloud.asset.v1p2beta1.AssetService/BatchGetAssetsHistory", - request_serializer=google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_asset__service__pb2.BatchGetAssetsHistoryRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_asset__service__pb2.BatchGetAssetsHistoryResponse.FromString, - ) self.CreateFeed = channel.unary_unary( "/google.cloud.asset.v1p2beta1.AssetService/CreateFeed", request_serializer=google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_asset__service__pb2.CreateFeedRequest.SerializeToString, @@ -61,27 +48,6 @@ class AssetServiceServicer(object): """Asset service definition. """ - def ExportAssets(self, request, context): - """Exports assets with time and resource types to a given Cloud Storage - location. The output format is newline-delimited JSON. - This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you - to keep track of the export. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") - - def BatchGetAssetsHistory(self, request, context): - """Batch gets the update history of assets that overlap a time window. - For RESOURCE content, this API outputs history with asset in both - non-delete or deleted status. - For IAM_POLICY content, this API outputs history when the asset and its - attached IAM POLICY both exist. This can create gaps in the output history. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") - def CreateFeed(self, request, context): """Creates a feed in a parent project/folder/organization to listen to its asset updates. @@ -121,16 +87,6 @@ def DeleteFeed(self, request, context): def add_AssetServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "ExportAssets": grpc.unary_unary_rpc_method_handler( - servicer.ExportAssets, - request_deserializer=google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_asset__service__pb2.ExportAssetsRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - "BatchGetAssetsHistory": grpc.unary_unary_rpc_method_handler( - servicer.BatchGetAssetsHistory, - request_deserializer=google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_asset__service__pb2.BatchGetAssetsHistoryRequest.FromString, - response_serializer=google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_asset__service__pb2.BatchGetAssetsHistoryResponse.SerializeToString, - ), "CreateFeed": grpc.unary_unary_rpc_method_handler( servicer.CreateFeed, request_deserializer=google_dot_cloud_dot_asset__v1p2beta1_dot_proto_dot_asset__service__pb2.CreateFeedRequest.FromString, diff --git a/asset/google/cloud/asset_v1p2beta1/proto/assets.proto b/asset/google/cloud/asset_v1p2beta1/proto/assets.proto index a9cda898a357..8fee229bbc39 100644 --- a/asset/google/cloud/asset_v1p2beta1/proto/assets.proto +++ b/asset/google/cloud/asset_v1p2beta1/proto/assets.proto @@ -74,15 +74,10 @@ message Asset { // each resource, there must be at most one Cloud IAM policy set on it. google.iam.v1.Policy iam_policy = 4; - // Cloud IAM policy name of the Cloud IAM policy set on a cloud resource. For - // each resource, there must be at most one Cloud IAM policy name associated - // with it. - bytes iam_policy_name = 5; - // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, // represented as a list of relative resource names. Ancestry path starts with - // the closest CRM ancestor and ending at a visible root. If the asset is a - // CRM project/ folder/organization, this starts from the asset itself. + // the closest CRM ancestor and ends at root. If the asset is a CRM + // project/folder/organization, this starts from the asset itself. // // Example: ["projects/123456789", "folders/5432", "organizations/1234"] repeated string ancestors = 6; @@ -128,8 +123,4 @@ message Resource { // The content of the resource, in which some sensitive fields are scrubbed // away and may not be present. google.protobuf.Struct data = 6; - - // The actual metadata content for the resource, only visible for internal - // users. - google.protobuf.Any internal_data = 7; } diff --git a/asset/google/cloud/asset_v1p2beta1/proto/assets_pb2.py b/asset/google/cloud/asset_v1p2beta1/proto/assets_pb2.py index 1d39f1e1e696..24f9eca61770 100644 --- a/asset/google/cloud/asset_v1p2beta1/proto/assets_pb2.py +++ b/asset/google/cloud/asset_v1p2beta1/proto/assets_pb2.py @@ -30,7 +30,7 @@ "\n com.google.cloud.asset.v1p2beta1B\nAssetProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset\370\001\001\252\002\034Google.Cloud.Asset.v1p2beta1\312\002\034Google\\Cloud\\Asset\\v1p2beta1" ), serialized_pb=_b( - '\n/google/cloud/asset_v1p2beta1/proto/assets.proto\x12\x1cgoogle.cloud.asset.v1p2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x8e\x01\n\rTemporalAsset\x12\x38\n\x06window\x18\x01 \x01(\x0b\x32(.google.cloud.asset.v1p2beta1.TimeWindow\x12\x0f\n\x07\x64\x65leted\x18\x02 \x01(\x08\x12\x32\n\x05\x61sset\x18\x03 \x01(\x0b\x32#.google.cloud.asset.v1p2beta1.Asset"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xba\x01\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x38\n\x08resource\x18\x03 \x01(\x0b\x32&.google.cloud.asset.v1p2beta1.Resource\x12)\n\niam_policy\x18\x04 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12\x17\n\x0fiam_policy_name\x18\x05 \x01(\x0c\x12\x11\n\tancestors\x18\x06 \x03(\t"\xcd\x01\n\x08Resource\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x1e\n\x16\x64iscovery_document_uri\x18\x02 \x01(\t\x12\x16\n\x0e\x64iscovery_name\x18\x03 \x01(\t\x12\x14\n\x0cresource_url\x18\x04 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12%\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12+\n\rinternal_data\x18\x07 \x01(\x0b\x32\x14.google.protobuf.AnyB\xb4\x01\n com.google.cloud.asset.v1p2beta1B\nAssetProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset\xf8\x01\x01\xaa\x02\x1cGoogle.Cloud.Asset.v1p2beta1\xca\x02\x1cGoogle\\Cloud\\Asset\\v1p2beta1b\x06proto3' + '\n/google/cloud/asset_v1p2beta1/proto/assets.proto\x12\x1cgoogle.cloud.asset.v1p2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x8e\x01\n\rTemporalAsset\x12\x38\n\x06window\x18\x01 \x01(\x0b\x32(.google.cloud.asset.v1p2beta1.TimeWindow\x12\x0f\n\x07\x64\x65leted\x18\x02 \x01(\x08\x12\x32\n\x05\x61sset\x18\x03 \x01(\x0b\x32#.google.cloud.asset.v1p2beta1.Asset"j\n\nTimeWindow\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xa1\x01\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x38\n\x08resource\x18\x03 \x01(\x0b\x32&.google.cloud.asset.v1p2beta1.Resource\x12)\n\niam_policy\x18\x04 \x01(\x0b\x32\x15.google.iam.v1.Policy\x12\x11\n\tancestors\x18\x06 \x03(\t"\xa0\x01\n\x08Resource\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x1e\n\x16\x64iscovery_document_uri\x18\x02 \x01(\t\x12\x16\n\x0e\x64iscovery_name\x18\x03 \x01(\t\x12\x14\n\x0cresource_url\x18\x04 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12%\n\x04\x64\x61ta\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\xb4\x01\n com.google.cloud.asset.v1p2beta1B\nAssetProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset\xf8\x01\x01\xaa\x02\x1cGoogle.Cloud.Asset.v1p2beta1\xca\x02\x1cGoogle\\Cloud\\Asset\\v1p2beta1b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, @@ -253,28 +253,10 @@ serialized_options=None, file=DESCRIPTOR, ), - _descriptor.FieldDescriptor( - name="iam_policy_name", - full_name="google.cloud.asset.v1p2beta1.Asset.iam_policy_name", - index=4, - number=5, - type=12, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b(""), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), _descriptor.FieldDescriptor( name="ancestors", full_name="google.cloud.asset.v1p2beta1.Asset.ancestors", - index=5, + index=4, number=6, type=9, cpp_type=9, @@ -299,7 +281,7 @@ extension_ranges=[], oneofs=[], serialized_start=483, - serialized_end=669, + serialized_end=644, ) @@ -418,24 +400,6 @@ serialized_options=None, file=DESCRIPTOR, ), - _descriptor.FieldDescriptor( - name="internal_data", - full_name="google.cloud.asset.v1p2beta1.Resource.internal_data", - index=6, - number=7, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), ], extensions=[], nested_types=[], @@ -445,8 +409,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=672, - serialized_end=877, + serialized_start=647, + serialized_end=807, ) _TEMPORALASSET.fields_by_name["window"].message_type = _TIMEWINDOW @@ -466,9 +430,6 @@ _RESOURCE.fields_by_name[ "data" ].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT -_RESOURCE.fields_by_name[ - "internal_data" -].message_type = google_dot_protobuf_dot_any__pb2._ANY DESCRIPTOR.message_types_by_name["TemporalAsset"] = _TEMPORALASSET DESCRIPTOR.message_types_by_name["TimeWindow"] = _TIMEWINDOW DESCRIPTOR.message_types_by_name["Asset"] = _ASSET @@ -544,18 +505,13 @@ Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it. - iam_policy_name: - Cloud IAM policy name of the Cloud IAM policy set on a cloud - resource. For each resource, there must be at most one Cloud - IAM policy name associated with it. ancestors: Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. - Ancestry path starts with the closest CRM ancestor and ending - at a visible root. If the asset is a CRM project/ - folder/organization, this starts from the asset itself. - Example: ["projects/123456789", "folders/5432", - "organizations/1234"] + Ancestry path starts with the closest CRM ancestor and ends at + root. If the asset is a CRM project/folder/organization, this + starts from the asset itself. Example: ["projects/123456789", + "folders/5432", "organizations/1234"] """, # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.Asset) ), @@ -602,9 +558,6 @@ data: The content of the resource, in which some sensitive fields are scrubbed away and may not be present. - internal_data: - The actual metadata content for the resource, only visible for - internal users. """, # @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.Resource) ), diff --git a/asset/google/cloud/asset_v1p2beta1/types.py b/asset/google/cloud/asset_v1p2beta1/types.py index e882007f7cab..11791870497b 100644 --- a/asset/google/cloud/asset_v1p2beta1/types.py +++ b/asset/google/cloud/asset_v1p2beta1/types.py @@ -21,31 +21,13 @@ from google.api_core.protobuf_helpers import get_messages from google.cloud.asset_v1p2beta1.proto import asset_service_pb2 -from google.cloud.asset_v1p2beta1.proto import assets_pb2 -from google.iam.v1 import policy_pb2 -from google.longrunning import operations_pb2 -from google.protobuf import any_pb2 from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 -from google.protobuf import struct_pb2 -from google.protobuf import timestamp_pb2 -from google.rpc import status_pb2 -from google.type import expr_pb2 - - -_shared_modules = [ - policy_pb2, - operations_pb2, - any_pb2, - empty_pb2, - field_mask_pb2, - struct_pb2, - timestamp_pb2, - status_pb2, - expr_pb2, -] - -_local_modules = [asset_service_pb2, assets_pb2] + + +_shared_modules = [empty_pb2, field_mask_pb2] + +_local_modules = [asset_service_pb2] names = [] diff --git a/asset/synth.metadata b/asset/synth.metadata index c71beede5b5a..07770157e2f6 100644 --- a/asset/synth.metadata +++ b/asset/synth.metadata @@ -1,26 +1,27 @@ { - "updateTime": "2020-01-24T20:52:19.363395Z", + "updateTime": "2020-02-07T13:19:14.304586Z", "sources": [ { "generator": { "name": "artman", - "version": "0.43.0", - "dockerImage": "googleapis/artman@sha256:264654a37596a44b0668b8ce6ac41082d713f6ee150b3fc6425fa78cc64e4f20" + "version": "0.44.4", + "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" } }, { "git": { "name": "googleapis", - "remote": "git@github.com:googleapis/googleapis.git", - "sha": "3c39a1d6e23c1ef63c7fba4019c25e76c40dfe19", - "internalRef": "291420695" + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", + "internalRef": "293710856", + "log": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\ncf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\nBeta launch for PersonDetection and FaceDetection features.\n\nPiperOrigin-RevId: 291821782\n\n994e067fae3b21e195f7da932b08fff806d70b5d\nasset: add annotations to v1p2beta1\n\nPiperOrigin-RevId: 291815259\n\n244e1d2c89346ca2e0701b39e65552330d68545a\nAdd Playable Locations service\n\nPiperOrigin-RevId: 291806349\n\n909f8f67963daf45dd88d020877fb9029b76788d\nasset: add annotations to v1beta2\n\nPiperOrigin-RevId: 291805301\n\n" } }, { "template": { "name": "python_library", "origin": "synthtool.gcp", - "version": "2019.10.17" + "version": "2020.2.4" } } ], @@ -65,229 +66,5 @@ "config": "google/cloud/asset/artman_cloudasset_v1.yaml" } } - ], - "newFiles": [ - { - "path": "MANIFEST.in" - }, - { - "path": ".flake8" - }, - { - "path": ".coveragerc" - }, - { - "path": "setup.cfg" - }, - { - "path": "LICENSE" - }, - { - "path": "docs/_static/custom.css" - }, - { - "path": "docs/gapic/v1/api.rst" - }, - { - "path": "docs/gapic/v1/types.rst" - }, - { - "path": "docs/gapic/v1p2beta1/api.rst" - }, - { - "path": "docs/gapic/v1p2beta1/types.rst" - }, - { - "path": "docs/gapic/v1beta1/api.rst" - }, - { - "path": "docs/gapic/v1beta1/types.rst" - }, - { - "path": "docs/_templates/layout.html" - }, - { - "path": "google/__init__.py" - }, - { - "path": "google/cloud/__init__.py" - }, - { - "path": "google/cloud/asset.py" - }, - { - "path": "google/cloud/asset_v1/types.py" - }, - { - "path": "google/cloud/asset_v1/__init__.py" - }, - { - "path": "google/cloud/asset_v1/gapic/asset_service_client.py" - }, - { - "path": "google/cloud/asset_v1/gapic/__init__.py" - }, - { - "path": "google/cloud/asset_v1/gapic/enums.py" - }, - { - "path": "google/cloud/asset_v1/gapic/asset_service_client_config.py" - }, - { - "path": "google/cloud/asset_v1/gapic/transports/__init__.py" - }, - { - "path": "google/cloud/asset_v1/gapic/transports/asset_service_grpc_transport.py" - }, - { - "path": "google/cloud/asset_v1/proto/__init__.py" - }, - { - "path": "google/cloud/asset_v1/proto/assets.proto" - }, - { - "path": "google/cloud/asset_v1/proto/asset_service.proto" - }, - { - "path": "google/cloud/asset_v1/proto/asset_service_pb2.py" - }, - { - "path": "google/cloud/asset_v1/proto/assets_pb2.py" - }, - { - "path": "google/cloud/asset_v1/proto/assets_pb2_grpc.py" - }, - { - "path": "google/cloud/asset_v1/proto/asset_service_pb2_grpc.py" - }, - { - "path": "google/cloud/asset_v1p1beta1/types.py" - }, - { - "path": "google/cloud/asset_v1p1beta1/__init__.py" - }, - { - "path": "google/cloud/asset_v1p1beta1/gapic/asset_service_client.py" - }, - { - "path": "google/cloud/asset_v1p1beta1/gapic/asset_service_client_config.py" - }, - { - "path": "google/cloud/asset_v1p1beta1/gapic/transports/asset_service_grpc_transport.py" - }, - { - "path": "google/cloud/asset_v1p1beta1/proto/asset_service_pb2.py" - }, - { - "path": "google/cloud/asset_v1p1beta1/proto/assets_pb2.py" - }, - { - "path": "google/cloud/asset_v1p1beta1/proto/assets_pb2_grpc.py" - }, - { - "path": "google/cloud/asset_v1p1beta1/proto/asset_service_pb2_grpc.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/types.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/__init__.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/gapic/asset_service_client.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/gapic/__init__.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/gapic/enums.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/gapic/asset_service_client_config.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/gapic/transports/__init__.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/gapic/transports/asset_service_grpc_transport.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/proto/__init__.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/proto/assets.proto" - }, - { - "path": "google/cloud/asset_v1p2beta1/proto/asset_service.proto" - }, - { - "path": "google/cloud/asset_v1p2beta1/proto/asset_service_pb2.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/proto/assets_pb2.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/proto/assets_pb2_grpc.py" - }, - { - "path": "google/cloud/asset_v1p2beta1/proto/asset_service_pb2_grpc.py" - }, - { - "path": "google/cloud/asset_v1beta1/types.py" - }, - { - "path": "google/cloud/asset_v1beta1/__init__.py" - }, - { - "path": "google/cloud/asset_v1beta1/gapic/asset_service_client.py" - }, - { - "path": "google/cloud/asset_v1beta1/gapic/__init__.py" - }, - { - "path": "google/cloud/asset_v1beta1/gapic/enums.py" - }, - { - "path": "google/cloud/asset_v1beta1/gapic/asset_service_client_config.py" - }, - { - "path": "google/cloud/asset_v1beta1/gapic/transports/__init__.py" - }, - { - "path": "google/cloud/asset_v1beta1/gapic/transports/asset_service_grpc_transport.py" - }, - { - "path": "google/cloud/asset_v1beta1/proto/__init__.py" - }, - { - "path": "google/cloud/asset_v1beta1/proto/assets.proto" - }, - { - "path": "google/cloud/asset_v1beta1/proto/asset_service.proto" - }, - { - "path": "google/cloud/asset_v1beta1/proto/asset_service_pb2.py" - }, - { - "path": "google/cloud/asset_v1beta1/proto/assets_pb2.py" - }, - { - "path": "google/cloud/asset_v1beta1/proto/assets_pb2_grpc.py" - }, - { - "path": "google/cloud/asset_v1beta1/proto/asset_service_pb2_grpc.py" - }, - { - "path": "tests/unit/gapic/v1/test_asset_service_client_v1.py" - }, - { - "path": "tests/unit/gapic/v1p1beta1/test_asset_service_client_v1p1beta1.py" - }, - { - "path": "tests/unit/gapic/v1p2beta1/test_asset_service_client_v1p2beta1.py" - }, - { - "path": "tests/unit/gapic/v1beta1/test_asset_service_client_v1beta1.py" - } ] } \ No newline at end of file diff --git a/asset/tests/unit/gapic/v1p1beta1/test_asset_service_client_v1p1beta1.py b/asset/tests/unit/gapic/v1p1beta1/test_asset_service_client_v1p1beta1.py index 04a649fdf0d8..e34fcdc9f100 100644 --- a/asset/tests/unit/gapic/v1p1beta1/test_asset_service_client_v1p1beta1.py +++ b/asset/tests/unit/gapic/v1p1beta1/test_asset_service_client_v1p1beta1.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/tests/unit/gapic/v1p2beta1/test_asset_service_client_v1p2beta1.py b/asset/tests/unit/gapic/v1p2beta1/test_asset_service_client_v1p2beta1.py index 0ef8c4e6515f..539d0fda4d42 100644 --- a/asset/tests/unit/gapic/v1p2beta1/test_asset_service_client_v1p2beta1.py +++ b/asset/tests/unit/gapic/v1p2beta1/test_asset_service_client_v1p2beta1.py @@ -19,12 +19,8 @@ import mock import pytest -from google.rpc import status_pb2 - from google.cloud import asset_v1p2beta1 -from google.cloud.asset_v1p2beta1 import enums from google.cloud.asset_v1p2beta1.proto import asset_service_pb2 -from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 @@ -66,105 +62,6 @@ class CustomException(Exception): class TestAssetServiceClient(object): - def test_export_assets(self): - # Setup Expected Response - expected_response = {} - expected_response = asset_service_pb2.ExportAssetsResponse(**expected_response) - operation = operations_pb2.Operation( - name="operations/test_export_assets", done=True - ) - operation.response.Pack(expected_response) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = asset_v1p2beta1.AssetServiceClient() - - # Setup Request - parent = "parent-995424086" - output_config = {} - - response = client.export_assets(parent, output_config) - result = response.result() - assert expected_response == result - - assert len(channel.requests) == 1 - expected_request = asset_service_pb2.ExportAssetsRequest( - parent=parent, output_config=output_config - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_export_assets_exception(self): - # Setup Response - error = status_pb2.Status() - operation = operations_pb2.Operation( - name="operations/test_export_assets_exception", done=True - ) - operation.error.CopyFrom(error) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = asset_v1p2beta1.AssetServiceClient() - - # Setup Request - parent = "parent-995424086" - output_config = {} - - response = client.export_assets(parent, output_config) - exception = response.exception() - assert exception.errors[0] == error - - def test_batch_get_assets_history(self): - # Setup Expected Response - expected_response = {} - expected_response = asset_service_pb2.BatchGetAssetsHistoryResponse( - **expected_response - ) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = asset_v1p2beta1.AssetServiceClient() - - # Setup Request - parent = "parent-995424086" - asset_names = [] - content_type = enums.ContentType.CONTENT_TYPE_UNSPECIFIED - - response = client.batch_get_assets_history(parent, asset_names, content_type) - assert expected_response == response - - assert len(channel.requests) == 1 - expected_request = asset_service_pb2.BatchGetAssetsHistoryRequest( - parent=parent, asset_names=asset_names, content_type=content_type - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_batch_get_assets_history_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = asset_v1p2beta1.AssetServiceClient() - - # Setup request - parent = "parent-995424086" - asset_names = [] - content_type = enums.ContentType.CONTENT_TYPE_UNSPECIFIED - - with pytest.raises(CustomException): - client.batch_get_assets_history(parent, asset_names, content_type) - def test_create_feed(self): # Setup Expected Response name = "name3373707"