@@ -783,6 +783,91 @@ def create(
783
783
timeout = timeout ,
784
784
)
785
785
786
+ def update (
787
+ self ,
788
+ client = None ,
789
+ timeout = _DEFAULT_TIMEOUT ,
790
+ if_metageneration_match = None ,
791
+ if_metageneration_not_match = None ,
792
+ ):
793
+ """Sends all properties in a PUT request.
794
+
795
+ Updates the ``_properties`` with the response from the backend.
796
+
797
+ If :attr:`user_project` is set, bills the API request to that project.
798
+
799
+ :type client: :class:`~google.cloud.storage.client.Client` or
800
+ ``NoneType``
801
+ :param client: the client to use. If not passed, falls back to the
802
+ ``client`` stored on the current object.
803
+
804
+ :type timeout: float or tuple
805
+ :param timeout: (Optional) The amount of time, in seconds, to wait
806
+ for the server response.
807
+
808
+ Can also be passed as a tuple (connect_timeout, read_timeout).
809
+ See :meth:`requests.Session.request` documentation for details.
810
+
811
+ :type if_metageneration_match: long
812
+ :param if_metageneration_match: (Optional) Make the operation conditional on whether the
813
+ blob's current metageneration matches the given value.
814
+
815
+ :type if_metageneration_not_match: long
816
+ :param if_metageneration_not_match: (Optional) Make the operation conditional on whether the
817
+ blob's current metageneration does not match the given value.
818
+ """
819
+ super (Bucket , self ).update (
820
+ client = client ,
821
+ timeout = timeout ,
822
+ if_metageneration_match = if_metageneration_match ,
823
+ if_metageneration_not_match = if_metageneration_not_match ,
824
+ )
825
+
826
+ def reload (
827
+ self ,
828
+ client = None ,
829
+ projection = "noAcl" ,
830
+ timeout = _DEFAULT_TIMEOUT ,
831
+ if_metageneration_match = None ,
832
+ if_metageneration_not_match = None ,
833
+ ):
834
+ """Reload properties from Cloud Storage.
835
+
836
+ If :attr:`user_project` is set, bills the API request to that project.
837
+
838
+ :type client: :class:`~google.cloud.storage.client.Client` or
839
+ ``NoneType``
840
+ :param client: the client to use. If not passed, falls back to the
841
+ ``client`` stored on the current object.
842
+
843
+ :type projection: str
844
+ :param projection: (Optional) If used, must be 'full' or 'noAcl'.
845
+ Defaults to ``'noAcl'``. Specifies the set of
846
+ properties to return.
847
+
848
+ :type timeout: float or tuple
849
+ :param timeout: (Optional) The amount of time, in seconds, to wait
850
+ for the server response.
851
+
852
+ Can also be passed as a tuple (connect_timeout, read_timeout).
853
+ See :meth:`requests.Session.request` documentation for details.
854
+
855
+ :type if_metageneration_match: long
856
+ :param if_metageneration_match: (Optional) Make the operation conditional on whether the
857
+ blob's current metageneration matches the given value.
858
+
859
+ :type if_metageneration_not_match: long
860
+ :param if_metageneration_not_match: (Optional) Make the operation conditional on whether the
861
+ blob's current metageneration does not match the given value.
862
+ """
863
+ super (Bucket , self ).reload (
864
+ client = client ,
865
+ projection = projection ,
866
+ timeout = timeout ,
867
+ if_metageneration_match = if_metageneration_match ,
868
+ if_metageneration_not_match = if_metageneration_not_match ,
869
+ )
870
+
786
871
def patch (
787
872
self ,
788
873
client = None ,
0 commit comments