Skip to content

Commit

Permalink
docs(storage): add documentation for blob and bucket name property (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
HemangChothani authored and cojenco committed Oct 13, 2021
1 parent 3bd5bac commit 12ba11b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions google/cloud/storage/blob.py
Expand Up @@ -174,6 +174,10 @@ def __init__(
kms_key_name=None,
generation=None,
):
"""
property :attr:`name`
Get the blob's name.
"""
name = _bytes_to_unicode(name)
super(Blob, self).__init__(name=name)

Expand Down
4 changes: 4 additions & 0 deletions google/cloud/storage/bucket.py
Expand Up @@ -505,6 +505,10 @@ class Bucket(_PropertyMixin):
"""Allowed values for :attr:`location_type`."""

def __init__(self, client, name=None, user_project=None):
"""
property :attr:`name`
Get the bucket's name.
"""
name = _validate_name(name)
super(Bucket, self).__init__(name=name)
self._client = client
Expand Down

0 comments on commit 12ba11b

Please sign in to comment.