Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: add v1p4beta1 (#16)
  • Loading branch information
busunkim96 committed Mar 16, 2020
1 parent 3706726 commit b5771c3
Show file tree
Hide file tree
Showing 32 changed files with 4,103 additions and 687 deletions.
6 changes: 6 additions & 0 deletions docs/gapic/v1p4beta1/api.rst
@@ -0,0 +1,6 @@
Client for Cloud Asset API
==========================

.. automodule:: google.cloud.asset_v1p4beta1
:members:
:inherited-members:
5 changes: 5 additions & 0 deletions docs/gapic/v1p4beta1/types.rst
@@ -0,0 +1,5 @@
Types for Cloud Asset API Client
================================

.. automodule:: google.cloud.asset_v1p4beta1.types
:members:
19 changes: 13 additions & 6 deletions docs/index.rst
Expand Up @@ -14,11 +14,11 @@ v1
gapic/v1/api
gapic/v1/types

Beta releases with additional features over the current stable version, spelled ``v1p1beta1`` and ``v1p2beta1``,
are provided to allow you to use these new features. These are expected to move into the stable release soon;
Beta releases with additional features over the current stable version. These are expected to move into the stable release soon;
until then, the usual beta admonishment (changes are possible, etc.) applies.

An API and type reference is provided for this beta:
In order to use it, you will want to import from
``google.cloud.asset_v1p4beta1`` in lieu of ``google.cloud.asset_v1``.

v1p1beta1
~~~~~~~~~
Expand All @@ -37,9 +37,16 @@ v1p2beta1
gapic/v1p2beta1/api
gapic/v1p2beta1/types

The previous beta release, spelled ``v1beta1`` is also provided to continue to support code
previously written against it. In order to use it, you will want to import from
``google.cloud.asset_v1beta1`` in lieu of ``google.cloud.asset_v1``.

v1p4beta1
~~~~~~~~~
.. toctree::
:maxdepth: 2

gapic/v1p4beta1/api
gapic/v1p4beta1/types



v1beta1
~~~~~~~~~
Expand Down
61 changes: 31 additions & 30 deletions google/cloud/asset_v1/gapic/asset_service_client.py
Expand Up @@ -338,12 +338,12 @@ def batch_get_assets_history(
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. If a specified asset does not exist, this
API returns an INVALID\_ARGUMENT error.
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. If a specified asset does not exist,
this API returns an INVALID_ARGUMENT error.
Example:
>>> from google.cloud import asset_v1
Expand All @@ -367,12 +367,12 @@ def batch_get_assets_history(
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_v1.types.ContentType): Optional. The content type.
read_time_window (Union[dict, ~google.cloud.asset_v1.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.
read_time_window (Union[dict, ~google.cloud.asset_v1.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_v1.types.TimeWindow`
Expand Down Expand Up @@ -476,10 +476,11 @@ 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_v1.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
feed (Union[dict, ~google.cloud.asset_v1.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
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.asset_v1.types.Feed`
Expand Down Expand Up @@ -554,9 +555,9 @@ def get_feed(
Args:
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
projects/project_number/feeds/feed_id
folders/folder_number/feeds/feed_id
organizations/organization_number/feeds/feed_id
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.
Expand Down Expand Up @@ -702,17 +703,17 @@ def update_feed(
>>> response = client.update_feed(feed, update_mask)
Args:
feed (Union[dict, ~google.cloud.asset_v1.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.
feed (Union[dict, ~google.cloud.asset_v1.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_v1.types.Feed`
update_mask (Union[dict, ~google.cloud.asset_v1.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.
update_mask (Union[dict, ~google.cloud.asset_v1.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_v1.types.FieldMask`
Expand Down Expand Up @@ -787,9 +788,9 @@ def delete_feed(
Args:
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
projects/project_number/feeds/feed_id
folders/folder_number/feeds/feed_id
organizations/organization_number/feeds/feed_id
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.
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/asset_v1/gapic/enums.py
Expand Up @@ -40,8 +40,8 @@ class ContentType(enum.IntEnum):

class NullValue(enum.IntEnum):
"""
``NullValue`` is a singleton enumeration to represent the null value for
the ``Value`` type union.
``NullValue`` is a singleton enumeration to represent the null value
for the ``Value`` type union.
The JSON representation for ``NullValue`` is JSON ``null``.
Expand Down
Expand Up @@ -135,12 +135,12 @@ def export_assets(self):
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. If a specified asset does not exist, this
API returns an INVALID\_ARGUMENT error.
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. If a specified asset does not exist,
this API returns an INVALID_ARGUMENT error.
Returns:
Callable: A callable which accepts the appropriate
Expand Down

0 comments on commit b5771c3

Please sign in to comment.