@@ -60,14 +60,14 @@ def __init__(self, name: str = ""):
6060
6161 def log_create_with_lro (
6262 self ,
63- cls : Type ["AiPlatformResourceNoun " ],
63+ cls : Type ["VertexAiResourceNoun " ],
6464 lro : Optional [operation .Operation ] = None ,
6565 ):
6666 """Logs create event with LRO.
6767
6868 Args:
69- cls (AiPlatformResourceNoune ):
70- AI Platform Resource Noun class that is being created.
69+ cls (VertexAiResourceNoun ):
70+ Vertex AI Resource Noun class that is being created.
7171 lro (operation.Operation):
7272 Optional. Backing LRO for creation.
7373 """
@@ -80,7 +80,7 @@ def log_create_with_lro(
8080
8181 def log_create_complete (
8282 self ,
83- cls : Type ["AiPlatformResourceNoun " ],
83+ cls : Type ["VertexAiResourceNoun " ],
8484 resource : proto .Message ,
8585 variable_name : str ,
8686 ):
@@ -89,10 +89,10 @@ def log_create_complete(
8989 Will also include code snippet to instantiate resource in SDK.
9090
9191 Args:
92- cls (AiPlatformResourceNoun ):
93- AI Platform Resource Noun class that is being created.
92+ cls (VertexAiResourceNoun ):
93+ Vertex AI Resource Noun class that is being created.
9494 resource (proto.Message):
95- AI Platform Resourc proto.Message
95+ Vertex AI Resourc proto.Message
9696 variable_name (str): Name of variable to use for code snippet
9797 """
9898 self ._logger .info (f"{ cls .__name__ } created. Resource name: { resource .name } " )
@@ -103,7 +103,7 @@ def log_create_complete(
103103
104104 def log_create_complete_with_getter (
105105 self ,
106- cls : Type ["AiPlatformResourceNoun " ],
106+ cls : Type ["VertexAiResourceNoun " ],
107107 resource : proto .Message ,
108108 variable_name : str ,
109109 ):
@@ -112,10 +112,10 @@ def log_create_complete_with_getter(
112112 Will also include code snippet to instantiate resource in SDK.
113113
114114 Args:
115- cls (AiPlatformResourceNoun ):
116- AI Platform Resource Noun class that is being created.
115+ cls (VertexAiResourceNoun ):
116+ Vertex AI Resource Noun class that is being created.
117117 resource (proto.Message):
118- AI Platform Resourc proto.Message
118+ Vertex AI Resourc proto.Message
119119 variable_name (str): Name of variable to use for code snippet
120120 """
121121 self ._logger .info (f"{ cls .__name__ } created. Resource name: { resource .name } " )
@@ -125,14 +125,14 @@ def log_create_complete_with_getter(
125125 )
126126
127127 def log_action_start_against_resource (
128- self , action : str , noun : str , resource_noun_obj : "AiPlatformResourceNoun "
128+ self , action : str , noun : str , resource_noun_obj : "VertexAiResourceNoun "
129129 ):
130130 """Logs intention to start an action against a resource.
131131
132132 Args:
133133 action (str): Action to complete against the resource ie: "Deploying". Can be empty string.
134134 noun (str): Noun the action acts on against the resource. Can be empty string.
135- resource_noun_obj (AiPlatformResourceNoun ):
135+ resource_noun_obj (VertexAiResourceNoun ):
136136 Resource noun object the action is acting against.
137137 """
138138 self ._logger .info (
@@ -143,15 +143,15 @@ def log_action_started_against_resource_with_lro(
143143 self ,
144144 action : str ,
145145 noun : str ,
146- cls : Type ["AiPlatformResourceNoun " ],
146+ cls : Type ["VertexAiResourceNoun " ],
147147 lro : operation .Operation ,
148148 ):
149149 """Logs an action started against a resource with lro.
150150
151151 Args:
152152 action (str): Action started against resource. ie: "Deploy". Can be empty string.
153153 noun (str): Noun the action acts on against the resource. Can be empty string.
154- cls (AiPlatformResourceNoun ):
154+ cls (VertexAiResourceNoun ):
155155 Resource noun object the action is acting against.
156156 lro (operation.Operation): Backing LRO for action.
157157 """
@@ -160,14 +160,14 @@ def log_action_started_against_resource_with_lro(
160160 )
161161
162162 def log_action_completed_against_resource (
163- self , noun : str , action : str , resource_noun_obj : "AiPlatformResourceNoun "
163+ self , noun : str , action : str , resource_noun_obj : "VertexAiResourceNoun "
164164 ):
165165 """Logs action completed against resource.
166166
167167 Args:
168168 noun (str): Noun the action acts on against the resource. Can be empty string.
169169 action (str): Action started against resource. ie: "Deployed". Can be empty string.
170- resource_noun_obj (AiPlatformResourceNoun ):
170+ resource_noun_obj (VertexAiResourceNoun ):
171171 Resource noun object the action is acting against
172172 """
173173 self ._logger .info (
@@ -385,8 +385,8 @@ def __repr__(self) -> str:
385385 return object .__repr__ (self )
386386
387387
388- class AiPlatformResourceNoun (metaclass = abc .ABCMeta ):
389- """Base class the AI Platform resource nouns.
388+ class VertexAiResourceNoun (metaclass = abc .ABCMeta ):
389+ """Base class the Vertex AI resource nouns.
390390
391391 Subclasses require two class attributes:
392392
@@ -400,7 +400,7 @@ class AiPlatformResourceNoun(metaclass=abc.ABCMeta):
400400 @property
401401 @classmethod
402402 @abc .abstractmethod
403- def client_class (cls ) -> Type [utils .AiPlatformServiceClientWithOverride ]:
403+ def client_class (cls ) -> Type [utils .VertexAiServiceClientWithOverride ]:
404404 """Client class required to interact with resource with optional
405405 overrides."""
406406 pass
@@ -464,7 +464,7 @@ def _instantiate_client(
464464 cls ,
465465 location : Optional [str ] = None ,
466466 credentials : Optional [auth_credentials .Credentials ] = None ,
467- ) -> utils .AiPlatformServiceClientWithOverride :
467+ ) -> utils .VertexAiServiceClientWithOverride :
468468 """Helper method to instantiate service client for resource noun.
469469
470470 Args:
@@ -473,7 +473,7 @@ def _instantiate_client(
473473 Optional custom credentials to use when accessing interacting with
474474 resource noun.
475475 Returns:
476- client (utils.AiPlatformServiceClientWithOverride ):
476+ client (utils.VertexAiServiceClientWithOverride ):
477477 Initialized service client for this service noun with optional overrides.
478478 """
479479 return initializer .global_config .create_client (
@@ -580,7 +580,7 @@ def optional_sync(
580580 return_input_arg : Optional [str ] = None ,
581581 bind_future_to_self : bool = True ,
582582):
583- """Decorator for AiPlatformResourceNounWithFutureManager with optional sync
583+ """Decorator for VertexAiResourceNounWithFutureManager with optional sync
584584 support.
585585
586586 Methods with this decorator should include a "sync" argument that defaults to
@@ -714,8 +714,8 @@ def wrapper(*args, **kwargs):
714714 return optional_run_in_thread
715715
716716
717- class AiPlatformResourceNounWithFutureManager ( AiPlatformResourceNoun , FutureManager ):
718- """Allows optional asynchronous calls to this AI Platform Resource
717+ class VertexAiResourceNounWithFutureManager ( VertexAiResourceNoun , FutureManager ):
718+ """Allows optional asynchronous calls to this Vertex AI Resource
719719 Nouns."""
720720
721721 def __init__ (
@@ -735,7 +735,7 @@ def __init__(
735735 resource noun.
736736 resource_name(str): A fully-qualified resource name or ID.
737737 """
738- AiPlatformResourceNoun .__init__ (
738+ VertexAiResourceNoun .__init__ (
739739 self ,
740740 project = project ,
741741 location = location ,
@@ -751,7 +751,7 @@ def _empty_constructor(
751751 location : Optional [str ] = None ,
752752 credentials : Optional [auth_credentials .Credentials ] = None ,
753753 resource_name : Optional [str ] = None ,
754- ) -> "AiPlatformResourceNounWithFutureManager " :
754+ ) -> "VertexAiResourceNounWithFutureManager " :
755755 """Initializes with all attributes set to None.
756756
757757 The attributes should be populated after a future is complete. This allows
@@ -768,7 +768,7 @@ def _empty_constructor(
768768 An instance of this class with attributes set to None.
769769 """
770770 self = cls .__new__ (cls )
771- AiPlatformResourceNoun .__init__ (
771+ VertexAiResourceNoun .__init__ (
772772 self ,
773773 project = project ,
774774 location = location ,
@@ -780,12 +780,12 @@ def _empty_constructor(
780780 return self
781781
782782 def _sync_object_with_future_result (
783- self , result : "AiPlatformResourceNounWithFutureManager "
783+ self , result : "VertexAiResourceNounWithFutureManager "
784784 ):
785785 """Populates attributes from a Future result to this object.
786786
787787 Args:
788- result: AiPlatformResourceNounWithFutureManager
788+ result: VertexAiResourceNounWithFutureManager
789789 Required. Result of future with same type as this object.
790790 """
791791 sync_attributes = [
@@ -811,12 +811,12 @@ def _construct_sdk_resource_from_gapic(
811811 project : Optional [str ] = None ,
812812 location : Optional [str ] = None ,
813813 credentials : Optional [auth_credentials .Credentials ] = None ,
814- ) -> AiPlatformResourceNoun :
814+ ) -> VertexAiResourceNoun :
815815 """Given a GAPIC resource object, return the SDK representation.
816816
817817 Args:
818818 gapic_resource (proto.Message):
819- A GAPIC representation of an AI Platform resource, usually
819+ A GAPIC representation of an Vertex AI resource, usually
820820 retrieved by a get_* or in a list_* API call.
821821 project (str):
822822 Optional. Project to construct SDK object from. If not set,
@@ -829,7 +829,7 @@ def _construct_sdk_resource_from_gapic(
829829 Overrides credentials set in aiplatform.init.
830830
831831 Returns:
832- AiPlatformResourceNoun :
832+ VertexAiResourceNoun :
833833 An initialized SDK object that represents GAPIC type.
834834 """
835835 sdk_resource = self ._empty_constructor (
@@ -849,8 +849,8 @@ def _list(
849849 project : Optional [str ] = None ,
850850 location : Optional [str ] = None ,
851851 credentials : Optional [auth_credentials .Credentials ] = None ,
852- ) -> List [AiPlatformResourceNoun ]:
853- """Private method to list all instances of this AI Platform Resource,
852+ ) -> List [VertexAiResourceNoun ]:
853+ """Private method to list all instances of this Vertex AI Resource,
854854 takes a `cls_filter` arg to filter to a particular SDK resource
855855 subclass.
856856
@@ -878,7 +878,7 @@ def _list(
878878 credentials set in aiplatform.init.
879879
880880 Returns:
881- List[AiPlatformResourceNoun ] - A list of SDK resource objects
881+ List[VertexAiResourceNoun ] - A list of SDK resource objects
882882 """
883883 self = cls ._empty_constructor (
884884 project = project , location = location , credentials = credentials
@@ -918,8 +918,8 @@ def _list_with_local_order(
918918 project : Optional [str ] = None ,
919919 location : Optional [str ] = None ,
920920 credentials : Optional [auth_credentials .Credentials ] = None ,
921- ) -> List [AiPlatformResourceNoun ]:
922- """Private method to list all instances of this AI Platform Resource,
921+ ) -> List [VertexAiResourceNoun ]:
922+ """Private method to list all instances of this Vertex AI Resource,
923923 takes a `cls_filter` arg to filter to a particular SDK resource
924924 subclass. Provides client-side sorting when a list API doesn't support
925925 `order_by`.
@@ -948,7 +948,7 @@ def _list_with_local_order(
948948 credentials set in aiplatform.init.
949949
950950 Returns:
951- List[AiPlatformResourceNoun ] - A list of SDK resource objects
951+ List[VertexAiResourceNoun ] - A list of SDK resource objects
952952 """
953953
954954 li = cls ._list (
@@ -980,8 +980,8 @@ def list(
980980 project : Optional [str ] = None ,
981981 location : Optional [str ] = None ,
982982 credentials : Optional [auth_credentials .Credentials ] = None ,
983- ) -> List [AiPlatformResourceNoun ]:
984- """List all instances of this AI Platform Resource.
983+ ) -> List [VertexAiResourceNoun ]:
984+ """List all instances of this Vertex AI Resource.
985985
986986 Example Usage:
987987
@@ -1010,7 +1010,7 @@ def list(
10101010 credentials set in aiplatform.init.
10111011
10121012 Returns:
1013- List[AiPlatformResourceNoun ] - A list of SDK resource objects
1013+ List[VertexAiResourceNoun ] - A list of SDK resource objects
10141014 """
10151015
10161016 return cls ._list (
@@ -1023,7 +1023,7 @@ def list(
10231023
10241024 @optional_sync ()
10251025 def delete (self , sync : bool = True ) -> None :
1026- """Deletes this AI Platform resource. WARNING: This deletion is
1026+ """Deletes this Vertex AI resource. WARNING: This deletion is
10271027 permament.
10281028
10291029 Args:
@@ -1042,7 +1042,7 @@ def delete(self, sync: bool = True) -> None:
10421042
10431043 def __repr__ (self ) -> str :
10441044 if self ._gca_resource :
1045- return AiPlatformResourceNoun .__repr__ (self )
1045+ return VertexAiResourceNoun .__repr__ (self )
10461046
10471047 return FutureManager .__repr__ (self )
10481048
0 commit comments