
    O                         S r SSKrSSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SS	KJr  SS
KJr  SSKJr   " S S\5      r " S S\5      r " S S\5      r " S S5      rg)z"Version-agnostic Fleet API client.    N)	Generator)encoding)
list_pager)gkehub_api_util)types)util)waiter)base)	resourcesc                       \ rS rSrSr\R                  R                  4S jrS r	S r
S rS rSS jr\S	\R                   S
\R$                  4S j5       r\S 5       r\S 5       r\S 5       rS rS rSrg)	HubClient   ak  Client for the GKE Hub API with related helper methods.

If not provided, the default client is for the GA (v1) track. This client
is a thin wrapper around the base client, and does not handle any exceptions.

Fields:
  release_track: The release track of the command [ALPHA, BETA, GA].
  client: The raw GKE Hub API client for the specified release track.
  messages: The matching messages module for the client.
  resourceless_waiter: A waiter.CloudOperationPollerNoResources for polling
    LROs that do not return a resource (like Deletes).
  feature_waiter: A waiter.CloudOperationPoller for polling Feature LROs.
c                 Z   Xl         [        R                  " U5      U l        [        R                  " U5      U l        [        R                  " U R                  R                  S9U l	        [        R                  " U R                  R                  U R                  R                  S9U l        g N)operation_service)result_servicer   )release_trackr   GetClientInstanceclientGetMessagesModulemessagesr	   CloudOperationPollerNoResourcesprojects_locations_operationsresourceless_waiterr   HubFeatureOperationPollerprojects_locations_featuresfeature_waiterselfr   s     4lib/googlecloudsdk/api_lib/container/fleet/client.py__init__HubClient.__init__.   s{    &((7DK**=9DM%EE++CC D *CC{{>>++CCD    c                     U R                   R                  UUUS9nU R                  R                  R	                  U5      $ )a  Creates a Feature and returns the long-running operation message.

Args:
  parent: The parent in the form /projects/*/locations/*.
  feature_id: The short ID for this Feature in the Hub API.
  feature: A Feature message specifying the Feature data to create.

Returns:
  The long running operation reference. Use the feature_waiter and
  OperationRef to watch the operation and get the final status, typically
  using waiter.WaitFor to present a user-friendly spinner.
)feature	featureIdparent)r   ,GkehubProjectsLocationsFeaturesCreateRequestr   r   Create)r   r'   
feature_idr%   reqs        r    CreateFeatureHubClient.CreateFeature:   sD     --
D
D E C
 ;;2299#>>r#   c                     U R                   R                  USS9nU R                  R                  R	                  U5      $ )zGets a Feature from the Hub API.

Args:
  name: The full resource name in the form
    /projects/*/locations/*/features/*.

Returns:
  The Feature message.
T)namereturnPartialSuccess)r   )GkehubProjectsLocationsFeaturesGetRequestr   r   Getr   r/   r+   s      r    
GetFeatureHubClient.GetFeatureN   sA     --
A
A! B C ;;2266s;;r#   c                     U R                   R                  USS9nU R                  R                  R	                  U5      nUR
                  $ )zLists Features from the Hub API.

Args:
  parent: The parent in the form /projects/*/locations/*.

Returns:
  A list of Features.
T)r'   r0   )r   *GkehubProjectsLocationsFeaturesListRequestr   r   Listr   )r   r'   r+   resps       r    ListFeaturesHubClient.ListFeatures^   sJ     --
B
B! C C
 ;;2277<D>>r#   c                     U R                   R                  USR                  U5      US9nU R                  R                  R                  U5      $ )a  Creates a Feature and returns the long-running operation message.

Args:
  name: The full resource name in the form
    /projects/*/locations/*/features/*.
  mask: A string list of the field paths to update.
  feature: A Feature message containing the Feature data to update using the
    mask.

Returns:
  The long running operation reference. Use the feature_waiter and
  OperationRef to watch the operation and get the final status, typically
  using waiter.WaitFor to present a user-friendly spinner.
,)r/   
updateMaskr%   )r   +GkehubProjectsLocationsFeaturesPatchRequestjoinr   r   Patch)r   r/   maskr%   r+   s        r    UpdateFeatureHubClient.UpdateFeatureo   sL     --
C
C88D> D C
 ;;2288==r#   c                     U R                   R                  UUS9nU R                  R                  R	                  U5      $ )a  Deletes a Feature and returns the long-running operation message.

Args:
  name: The full resource name in the form
    /projects/*/locations/*/features/*.
  force: Indicates the Feature should be force deleted.

Returns:
  The long running operation. Use the feature_waiter and OperationRef to
  watch the operation and get the final status, typically using
  waiter.WaitFor to present a user-friendly spinner.
)r/   force)r   ,GkehubProjectsLocationsFeaturesDeleteRequestr   r   Delete)r   r/   rF   r+   s       r    DeleteFeatureHubClient.DeleteFeature   sA     --
D
D E C ;;2299#>>r#   opreturnc                 R    [         R                  R                  U R                  SS9$ )z6Parses a gkehub Operation reference from an operation.$gkehub.projects.locations.operations
collection)r   REGISTRYParseRelativeNamer/   )rK   s    r    OperationRefHubClient.OperationRef   s,     //
B 0  r#   c                 t    U b  U R                   c  0 $ [        R                  " S U R                    5       5      $ )a  Helper to convert proto map Values to normal dictionaries.

encoding.MessageToPyValue recursively converts values to dicts, while this
method leaves the map values as proto objects.

Args:
  proto_map_value: The map field "Value". For example, the `Feature.labels`
    value (of type `Features.LabelsValue`). Can be None.

Returns:
  An OrderedDict of the map's keys/values, in the original order.
c              3   P   #    U  H  oR                   UR                  4v   M     g 7fN)keyvalue).0ps     r    	<genexpr>%HubClient.ToPyDict.<locals>.<genexpr>   s      #"FQ"Fs   $&)additionalPropertiescollectionsOrderedDict)proto_map_values    r    ToPyDictHubClient.ToPyDict   s@     /"F"F"Ni"" #"1"F"F#  r#   c                 h    [         R                  " U Uc  0 5      $ [        R                  U5      5      $ )a  Helper to convert proto map Values to default dictionaries.

encoding.MessageToPyValue recursively converts values to dicts, while this
method leaves the map values as proto objects.

Args:
  default_factory: Pass-through to collections.defaultdict.
  proto_map_value: The map field "Value". For example, the `Feature.labels`
    value (of type `Features.LabelsValue`). Can be None.

Returns:
  An defaultdict of the map's keys/values.
)r_   defaultdictr   rb   )default_factoryra   s     r    ToPyDefaultDictHubClient.ToPyDefaultDict   s:     ""% +4+=+=o+N r#   c                 ,    [         R                  " XSS9$ )zCencoding.DictToAdditionalPropertyMessage wrapper to match ToPyDict.T)
sort_items)r   DictToAdditionalPropertyMessage)map_value_clsrY   s     r    
ToProtoMapHubClient.ToProtoMap   s     33 r#   c                 b    U R                  U R                  R                  R                  U5      $ )z?Convenience wrapper for ToProtoMap for Feature.membershipSpecs.)rm   r   FeatureMembershipSpecsValuer   spec_maps     r    ToMembershipSpecsHubClient.ToMembershipSpecs   s#    ??4==00EExPPr#   c                 b    U R                  U R                  R                  R                  U5      $ )z:Convenience wrapper for ToProtoMap for Feature.scopeSpecs.)rm   r   rp   ScopeSpecsValuerr   s     r    ToScopeSpecsHubClient.ToScopeSpecs   s#    ??4==00@@(KKr#   )r   r   r   r   r   N)F)__name__
__module____qualname____firstlineno____doc__r
   ReleaseTrackGAr!   r,   r4   r:   rC   rI   staticmethodr   	Operationr   ResourcerS   rb   rg   rm   rt   rx   __static_attributes__ r#   r    r   r      s     $(#4#4#7#7 
?(< ">,?& u 9+=+=    &  &  QLr#   r   c                   d    \ rS rSrSr\R                  R                  4S jrS r	S r
S rS rSrg	)
HubV2Client   a|  Client for the GKE Hub V2 API with related helper methods.

If not provided, the default client is for the GA (v2) track.
This client is a thin wrapper around the base client, and does not handle
any exceptions.

Fields:
  release_track: The release track of the command [ALPHA].
  client: The raw GKE Hub API client for the specified release track.
  messages: The matching messages module for the client.
  resourceless_waiter: A waiter.CloudOperationPollerNoResources for polling
    LROs that do not return a resource (like Deletes).
  membership_feature_waiter: A waiter.CloudOperationPoller for polling
  Membership Feature LROs.
c                 Z   Xl         [        R                  " U5      U l        [        R                  " U5      U l        [        R                  " U R                  R                  S9U l	        [        R                  " U R                  R                  U R                  R                  S9U l        g r   )r   r   GetV2ClientInstancer   GetV2MessagesModuler   r	   r   r   r   CloudOperationPoller'projects_locations_memberships_featuresmembership_feature_waiterr   s     r    r!   HubV2Client.__init__   s{    &**=9DK,,];DM%EE++CC D &,%@%@{{JJ++CC&D"r#   c                     U R                   R                  UUUS9nU R                  R                  R	                  U5      $ )a  Creates a MembershipFeature and returns the long-running operation message.

Args:
  parent: The parent in the form /projects/*/locations/*/memberships/*.
  feature_id: The short ID for this Feature in the Hub API.
  membership_feature: A MembershipFeature message specifying the
    MembershipFeature data to create.

Returns:
  The long running operation reference. Use the membership_feature_waiter
  and OperationRef to watch the operation and get the final status,
  typically using waiter.WaitFor to present a user-friendly spinner.
)membershipFeaturer&   r'   )r   7GkehubProjectsLocationsMembershipsFeaturesCreateRequestr   r   r)   )r   r'   r*   membership_featurer+   s        r    CreateMembershipFeature#HubV2Client.CreateMembershipFeature   sD     --
O
O, P C
 ;;>>EEcJJr#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )zGets a MembershipFeature from the Hub V2 API.

Args:
  name: The full resource name in the form
    /projects/*/locations/*/memberships/*/features/*.

Returns:
  The MembershipFeature message.
r/   )r   4GkehubProjectsLocationsMembershipsFeaturesGetRequestr   r   r2   r3   s      r    GetMembershipFeature HubV2Client.GetMembershipFeature	  s>     --
L
L M C ;;>>BB3GGr#   c                     U R                   R                  USR                  U5      USS9nU R                  R                  R                  U5      $ )a3  Updates a MembershipFeature and returns the long-running operation message.

Args:
  name: The full resource name in the form
    /projects/*/locations/*/memberships/*/features/*.
  mask: A string list of the field paths to update.
  membership_feature: A MembershipFeature message containing the Feature
    data to update using the mask.

Returns:
  The long running operation reference. Use the membership_feature_waiter
  and
  OperationRef to watch the operation and get the final status, typically
  using waiter.WaitFor to present a user-friendly spinner.
r=   T)r/   r>   r   allowMissing)r   6GkehubProjectsLocationsMembershipsFeaturesPatchRequestr@   r   r   rA   )r   r/   rB   r   r+   s        r    UpdateMembershipFeature#HubV2Client.UpdateMembershipFeature  sO      --
N
N88D>,	 O C ;;>>DDSIIr#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )a  Deletes a MembershipFeature and returns the long-running operation message.

Args:
  name: The full resource name in the form
    /projects/*/locations/*/memberships/*/features/*.

Returns:
  The long running operation. Use the membership_feature_waiter and
  OperationRef to
  watch the operation and get the final status, typically using
  waiter.WaitFor to present a user-friendly spinner.
r   )r   7GkehubProjectsLocationsMembershipsFeaturesDeleteRequestr   r   rH   r3   s      r    DeleteMembershipFeature#HubV2Client.DeleteMembershipFeature0  s>     --
O
O P C ;;>>EEcJJr#   )r   r   r   r   r   N)rz   r{   r|   r}   r~   r
   r   r   r!   r   r   r   r   r   r   r#   r    r   r      s5      $(#4#4#7#7 
K*HJ0Kr#   r   c                      \ rS rSrSr\R                  R                  4S jrS r	S\
R                  4S jrS\
R                  S\
R                  4S jrS\
R                   S\
R                  4S	 jrS
 rS rS rS rS rS rS r S<S jrS r S=S jrS r S<S jrS rS rS r S r!S r"S r#S r$S r%S r&S  r'S! r(S" r) S>S# jr*S$ r+S% r,S& r-S' r.S>S( jr/S?S) jr0S* r1S+ r2S, r3S- r4S. r5S/ r6S\
Rn                  4S0 jr8S\
Rr                  S\
Rt                  4S1 jr;  S=S\
Rx                  S\
Rz                  4S2 jjr>S\
R~                  4S3 jr@S\
R                  4S4 jrBS\
R                  4S5 jrDS\
R                  4S6 jrFS\
R                  S\
R                  4S7 jrI  S=S\
R                  S\
R                  4S8 jjrLS\
R                  4S9 jrNS\
R                  4S: jrPS;rQg)@FleetClientiC  af  Client for the Fleet API with related helper methods.

If not provided, the default client is for the alpha (v1) track. This client
is a thin wrapper around the base client, and does not handle any exceptions.

Fields:
  release_track: The release track of the command [ALPHA, BETA, GA].
  client: The raw Fleet API client for the specified release track.
  messages: The matching messages module for the client.
  resourceless_waiter: A waiter.CloudOperationPollerNoResources for polling
    LROs that do not return a resource (like Deletes).
  fleet_waiter: A waiter.CloudOperationPoller for polling fleet LROs.
c                    Xl         [        R                  " U5      U l        [        R                  " U5      U l        [        R                  " U R                  R                  S9U l	        U[        R                  R                  :X  aC  [        R                  " U R                  R                  U R                  R                  S9U l        g g r   )r   r   r   r   r   r   r	   r   r   r   r
   r   ALPHAr   projects_locations_fleetsfleet_waiterr   s     r    r!   FleetClient.__init__R  s    &((7DK**=9DM%EE++CC D ))/// 55>> KKEEd 0r#   c                     U R                   R                  [        R                  " U5      S9nU R                  R
                  R                  U5      $ )zGets a fleet resource from the Fleet API.

Args:
  project: the project containing the fleet.

Returns:
  A fleet resource

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   )r   'GkehubProjectsLocationsFleetsGetRequestr   FleetResourceNamer   r   r2   r   projectr+   s      r    GetFleetFleetClient.GetFleet`  sI     --
?
?##G, @ C ;;0044S99r#   r+   c                 L    U R                   R                  R                  U5      $ )a4  Creates a fleet resource from the Fleet API.

Args:
  req: An HTTP create request to be sent to the API server.

Returns:
  A long-running operation to be polled till completion, or returned
  directly if user specifies async flag.

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
)r   r   r)   r   r+   s     r    CreateFleetFleetClient.CreateFleetq  s     ;;0077<<r#   rL   c                 L    U R                   R                  R                  U5      $ )a1  Deletes a fleet resource from the Fleet API.

Args:
  req: An HTTP delete request to send to the API server.

Returns:
  A long-running operation to be polled till completion, or returned
  directly if user specifies async flag.

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
)r   r   rH   r   s     r    DeleteFleetFleetClient.DeleteFleet  s     ;;0077<<r#   c                 L    U R                   R                  R                  U5      $ )a0  Updates a fleet resource from the Fleet API.

Args:
  req: An HTTP patch request to send to the API server.

Returns:
  A long-running operation to be polled till completion, or returned
  directly if user specifies async flag.

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
)r   r   rA   r   s     r    UpdateFleetFleetClient.UpdateFleet  s     ;;0066s;;r#   c                     U(       a  [         R                  " U5      nO[         R                  " U5      nU R                  R	                  SUS9n[
        R                  " U R                  R                  USSS9$ )a  Lists fleets in an organization.

Args:
  project: the project to search.
  organization: the organization to search.

Returns:
  A ListFleetResponse (list of fleets and next page token)

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
 	pageTokenr'   fleetsNfieldbatch_size_attribute)	r   FleetOrgParentNameFleetParentNamer   (GkehubProjectsLocationsFleetsListRequestr   YieldFromListr   r   )r   r   organizationr'   r+   s        r    
ListFleetsFleetClient.ListFleets  sq     &&|4f##G,f
--
@
@V A C ##--!	 r#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )zGets a scope resource from the GKEHub API.

Args:
  scope_path: Full resource path of the scope.

Returns:
  A scope resource.

Raises:
  apitools.base.py.HttpError: If the request returns an HTTP error
r   )r   'GkehubProjectsLocationsScopesGetRequestr   projects_locations_scopesr2   r   
scope_pathr+   s      r    GetScopeFleetClient.GetScope  s6     --
?
?Z
?
PC;;0044S99r#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )zGets the IAM policy for a scope resource.

Args:
  scope_path: Full resource path of the scope.

Returns:
  An Iam Policy.

Raises:
  apitools.base.py.HttpError: If the request returns an HTTP error
)resource)r   0GkehubProjectsLocationsScopesGetIamPolicyRequestr   r   GetIamPolicyr   s      r    GetScopeIamPolicyFleetClient.GetScopeIamPolicy  s>     --
H
H I C ;;00==cBBr#   c                     U R                   R                  US9nU R                   R                  UUS9nU R                  R                  R                  U5      $ )zSets the IAM policy for a scope resource.

Args:
  scope_path: Full resource path of the scope.
  policy: IAM policy to be set for the scope.

Returns:
  An Iam Policy.

Raises:
  apitools.base.py.HttpError: If the request returns an HTTP error
)policy)r   setIamPolicyRequest)r   SetIamPolicyRequest0GkehubProjectsLocationsScopesSetIamPolicyRequestr   r   SetIamPolicy)r   r   r   policy_requestr+   s        r    SetScopeIamPolicyFleetClient.SetScopeIamPolicy  s_     ]]66 7 N --
H
H* I C ;;00==cBBr#   c                     [         R                  " U5      nU R                  R                  SUS9n[        R
                  " U R                  R                  USSS9$ )zLists scopes in a project.

Args:
  project: Project containing the scope.

Returns:
  A ListScopesResponse (list of scopes and next page token).

Raises:
  apitools.base.py.HttpError: If the request returns an HTTP error
r   r   scopesNr   )r   ScopeParentNamer   (GkehubProjectsLocationsScopesListRequestr   r   r   r   r   r   r'   r+   s       r    
ListScopesFleetClient.ListScopes  s^     !!'*F
--
@
@V A C ##--!	 r#   c                     [         R                  " U5      nU R                  R                  SUS9n[        R
                  " U R                  R                  USSSS9$ )a  Lists scopes in a project permitted to be viewed by the caller.

Args:
  project: Project containing the scope.

Returns:
  A ListPermittedScopesResponse (list of permitted scopes and next page
  token).

Raises:
  apitools.base.py.HttpError: If the request returns an HTTP error
r   r   ListPermittedr   Nmethodr   r   )r   r   r   1GkehubProjectsLocationsScopesListPermittedRequestr   r   r   r   r   s       r    ListPermittedScopesFleetClient.ListPermittedScopes  sa     !!'*F
--
I
IV J C ##--! r#   c                     U R                   R                  SUS9n[        R                  " U R                  R
                  USSSS9$ )a  Lists memberships bound to a scope.

Args:
  scope_path: Full resource path of the scope for listing bound memberships.

Returns:
  A ListMembershipsResponse (list of memberships and next page token)

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   )r   	scopeNameListMembershipsmembershipsNr   )r   3GkehubProjectsLocationsScopesListMembershipsRequestr   r   r   r   r   s      r    ListBoundMemberships FleetClient.ListBoundMemberships$  sQ     --
K
K
 L C ##-- ! r#   Nc                    U R                   R                  UUUS9nU R                   R                  UUUS9nU R                  R                  R                  U5      n[        R                  R                  UR                  SS9n[        R                  " [        R                  " U R                  R                  U R                  R                  5      US5      $ )a0  Updates a scope resource in the fleet.

Args:
  scope_path: Full resource path of the scope.
  labels:  Labels for the resource.
  namespace_labels:  Namespace-level labels for the cluster namespace.
  mask: A mask of the fields to update.

Returns:
  A longrunning operation for updating the namespace.
)r/   labelsnamespaceLabels)scoper/   r>   rN   rO   zWaiting for scope to be updated)r   Scope)GkehubProjectsLocationsScopesPatchRequestr   r   rA   r   rQ   rR   r/   r	   WaitForr   r   )	r   r   r   namespace_labelsrB   r   r+   rK   op_resources	            r    UpdateScopeFleetClient.UpdateScope;  s     MM(   E
 --
A
A B C
 
	.	.	4	4S	9B$$66
B 7 K >>##KK11KK55	
 	) r#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )zGets a namespace resource from the GKEHub API.

Args:
  namespace_path: Full resource path of the namespace.

Returns:
  A namespace resource.

Raises:
  apitools.base.py.HttpError: If the request returns an HTTP error
r   )r   1GkehubProjectsLocationsScopesNamespacesGetRequestr   $projects_locations_scopes_namespacesr2   )r   namespace_pathr+   s      r    GetScopeNamespaceFleetClient.GetScopeNamespace`  s>     --
I
I J C ;;;;??DDr#   c                    U R                   R                  USUUS9nU R                   R                  XaUS9nU R                  R                  R                  U5      n[        R                  R                  UR                  SS9n	[        R                  " [        R                  " U R                  R                  U R                  R                  5      U	S5      $ )a  Creates a namespace resource from the GKEHub API.

Args:
  name: The namespace name.
  namespace_path: Full resource path of the namespace.
  parent: Full resource path of the scope containing the namespace.
  labels: labels for namespace resource.
  namespace_labels: Namespace-level labels for the cluster namespace.

Returns:
  A namespace resource.

Raises:
  apitools.base.py.HttpError: If the request returns an HTTP error.
r   r/   r   r   r   )	namespacescopeNamespaceIdr'   rN   rO   #Waiting for namespace to be created)r   	Namespace4GkehubProjectsLocationsScopesNamespacesCreateRequestr   r  r)   r   rQ   rR   r/   r	   r   r   r   )
r   r/   r  r'   r   r   r	  r+   rK   r   s
             r    CreateScopeNamespace FleetClient.CreateScopeNamespaceq  s    $ ''(	 ( I --
L
L6 M C 
	9	9	@	@	EB$$66
B 7 K >>##KK<<KK55	
 	- r#   c                 N   U R                   R                  US9nU R                  R                  R	                  U5      n[
        R                  R                  UR                  SS9n[        R                  " [        R                  " U R                  R                  5      US5      $ )zDeletes a namespace resource from the fleet.

Args:
  namespace_path: Full resource path of the namespace.

Returns:
  A long running operation for deleting the namespace.

Raises:
  apitools.base.py.HttpError: If the request returns an HTTP error.
r   rN   rO   #Waiting for namespace to be deleted)r   4GkehubProjectsLocationsScopesNamespacesDeleteRequestr   r  rH   r   rQ   rR   r/   r	   r   r   r   )r   r  r+   rK   r   s        r    DeleteScopeNamespace FleetClient.DeleteScopeNamespace  s     --
L
L M C 
	9	9	@	@	EB$$66
B 7 K >>..KK55	
 	- r#   c                    U R                   R                  USUUS9nU R                   R                  UUUS9nU R                  R                  R                  U5      n[        R                  R                  UR                  SS9n[        R                  " [        R                  " U R                  R                  U R                  R                  5      US5      $ )aE  Updates a namespace resource in the fleet.

Args:
  namespace_path: Full resource path of the namespace.
  labels:  Labels for the resource.
  namespace_labels:  Namespace-level labels for the cluster namespace.
  mask: A mask of the fields to update.

Returns:
  A longrunning operation for updating the namespace.

Raises:
r   r  r	  r/   r>   rN   rO   #Waiting for namespace to be updated)r   r  3GkehubProjectsLocationsScopesNamespacesPatchRequestr   r  rA   r   rQ   rR   r/   r	   r   r   r   )	r   r  r   r   rB   r	  r+   rK   r   s	            r    UpdateScopeNamespace FleetClient.UpdateScopeNamespace  s    " ''(	 ( I --
K
K L C
 
	9	9	?	?	DB$$66
B 7 K >>##KK<<KK55	
 	- r#   c                     U R                   R                  SUS9n[        R                  " U R                  R
                  USSS9$ )a  Lists namespaces in a project.

Args:
  parent: Full resource path of the scope containing the namespace.

Returns:
  A ListNamespaceResponse (list of namespaces and next page token).

Raises:
  apitools.base.py.HttpError: If the request returns an HTTP error.
r   r   scopeNamespacesNr   )r   2GkehubProjectsLocationsScopesNamespacesListRequestr   r   r   r  )r   r'   r+   s      r    ListScopeNamespacesFleetClient.ListScopeNamespaces  sN     --
J
JV K C ##88!	 r#   c                     U R                   R                  [        R                  " X5      S9nU R                  R
                  R                  U5      $ )zGets a namespace resource from the GKEHub API.

Args:
  project: the project containing the namespace.
  name: the namespace name.

Returns:
  A namespace resource

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   )r   +GkehubProjectsLocationsNamespacesGetRequestr   NamespaceResourceNamer   projects_locations_namespacesr2   )r   r   r/   r+   s       r    GetNamespaceFleetClient.GetNamespace  sI     --
C
C''6 D C ;;4488==r#   c                     U R                   R                  [        R                  " X15      US9nU R                   R	                  UU[        R
                  " U5      S9nU R                  R                  R                  U5      n[        R                  R                  UR                  SS9n[        R                  " [        R                  " U R                  R                  U R                  R                   5      US5      $ )a   Creates a namespace resource from the GKEHub API.

Args:
  name: the namespace name.
  scope: the scope containing the namespace.
  project: the project containing the namespace.

Returns:
  A namespace resource

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r/   r   )r	  namespaceIdr'   rN   rO   r  )r   r  r   r"  .GkehubProjectsLocationsNamespacesCreateRequestNamespaceParentNamer   r#  r)   r   rQ   rR   r/   r	   r   r   r   )r   r/   r   r   r	  r+   rK   r   s           r    CreateNamespaceFleetClient.CreateNamespace  s     ''''6e ( I --
F
F''0 G C
 
	2	2	9	9#	>B$$66
B 7 K >>##KK55KK55	
 	- r#   c                 v   U R                   R                  [        R                  " X5      S9nU R                  R
                  R                  U5      n[        R                  R                  UR                  SS9n[        R                  " [        R                  " U R                  R                  5      US5      $ )zDeletes a namespace resource from the fleet.

Args:
  project: the project containing the namespace.
  name: the name of the namespace.

Returns:
  An operation

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   rN   rO   r  )r   .GkehubProjectsLocationsNamespacesDeleteRequestr   r"  r   r#  rH   r   rQ   rR   r/   r	   r   r   r   )r   r   r/   r+   rK   r   s         r    DeleteNamespaceFleetClient.DeleteNamespace(  s     --
F
F''6 G C 
	2	2	9	9#	>B$$66
B 7 K >>..KK55	
 	- r#   c                     U R                   R                  [        R                  " X15      US9nU R                   R	                  U[        R                  " X15      US9nU R
                  R                  R                  U5      n[        R                  R                  UR                  SS9n[        R                  " [        R                  " U R
                  R                  U R
                  R                  5      US5      $ )a9  Updates a namespace resource in the fleet.

Args:
  name: the namespace name.
  scope: the scope containing the namespace.
  project: the project containing the namespace.
  mask: a mask of the fields to update.

Returns:
  An operation

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r'  r  rN   rO   r  )r   r  r   r"  -GkehubProjectsLocationsNamespacesPatchRequestr   r#  rA   r   rQ   rR   r/   r	   r   r   r   )	r   r/   r   r   rB   r	  r+   rK   r   s	            r    UpdateNamespaceFleetClient.UpdateNamespaceD  s      ''''6e ( I --
E
E''6 F C
 
	2	2	8	8	=B$$66
B 7 K >>##KK55KK55	
 	- r#   c                     U R                   R                  S[        R                  " U5      S9n[        R
                  " U R                  R                  USSS9$ )zLists namespaces in a project.

Args:
  project: the project to list namespaces from.

Returns:
  A ListNamespaceResponse (list of namespaces and next page token)

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   r   
namespacesNr   )r   ,GkehubProjectsLocationsNamespacesListRequestr   r*  r   r   r   r#  r   s      r    ListNamespacesFleetClient.ListNamespacesi  sY     --
D
DT55g> E C ##11!	 r#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )zGets an RBACRoleBinding resource from the GKEHub API.

Args:
  name: the full rolebinding resource name.

Returns:
  An RBACRoleBinding resource

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   )r   ;GkehubProjectsLocationsNamespacesRbacrolebindingsGetRequestr   .projects_locations_namespaces_rbacrolebindingsr2   r3   s      r    GetRBACRoleBindingFleetClient.GetRBACRoleBinding  s>     --
S
S T C ;;EEII#NNr#   c           	         U R                   R                  UU R                   R                  U R                   R                  R                  UR	                  5       5      S9UUS9n[
        R                  R                  USSS9nU R                   R                  UUR                  5       UR                  5       R                  5       S9nU R                  R                  R                  U5      $ )ap  Creates an RBACRoleBinding resource from the GKEHub API.

Args:
  name: the full rbacrolebinding resource name.
  role: the role.
  user: the user.
  group: the group.

Returns:
  An RBACRoleBinding resource

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
  calliope_exceptions.RequiredArgumentException: if a required field is
    missing
predefinedRoler/   roleusergroupz5gkehub.projects.locations.namespaces.rbacrolebindingsv1alphaapi_versionrBACRoleBindingrbacrolebindingIdr'   )r   RBACRoleBindingRolePredefinedRoleValueValuesEnumupperr   rQ   rR   >GkehubProjectsLocationsNamespacesRbacrolebindingsCreateRequestNameParentRelativeNamer   r<  r)   r   r/   rC  rD  rE  rolebindingr   r+   s           r    CreateRBACRoleBinding!FleetClient.CreateRBACRoleBinding  s    " --//]]==--KK

   

  0 	K !!33? 4 H
 --
V
V#"--/ --/ W C
 ;;EELL r#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )zDeletes an RBACRoleBinding resource from the fleet.

Args:
  name: the resource name of the rolebinding.

Returns:
  An operation

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   )r   >GkehubProjectsLocationsNamespacesRbacrolebindingsDeleteRequestr   r<  rH   r3   s      r    DeleteRBACRoleBinding!FleetClient.DeleteRBACRoleBinding  sC     --
V
V W C ;;EELL r#   c                 \   U R                   R                  UUUU R                   R                  U R                   R                  R                  UR	                  5       5      S9S9nU R                   R                  XfR                  US9nU R                  R                  R                  U5      $ )a  Updates an RBACRoleBinding resource in the fleet.

Args:
  name: the rolebinding name.
  user: the user.
  group: the group.
  role: the role.
  mask: a mask of the fields to update.

Returns:
  An operation

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r@  )r/   rD  rE  rC  rJ  r/   r>   )
r   rL  rM  rN  rO  =GkehubProjectsLocationsNamespacesRbacrolebindingsPatchRequestr/   r   r<  rA   )r   r/   rD  rE  rC  rB   rU  r+   s           r    UpdateRBACRoleBinding!FleetClient.UpdateRBACRoleBinding  s    " --//]]==--KK

   
	 0 	K --
U
U#*:*:t V C ;;EEKKCPPr#   c                     U R                   R                  S[        R                  " X5      S9n[        R
                  " U R                  R                  USSS9$ )aF  Lists rolebindings in a namespace.

Args:
  project: the project containing the namespace to list rolebindings from.
  namespace: the namespace to list rolebindings from.

Returns:
  A ListNamespaceResponse (list of rolebindings and next page token)

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   r   rbacrolebindingsNr   )r   <GkehubProjectsLocationsNamespacesRbacrolebindingsListRequestr   RBACRoleBindingParentNamer   r   r   r<  )r   r   r	  r+   s       r    ListRBACRoleBindings FleetClient.ListRBACRoleBindings  sY     --
T
TT;;GO U C ##BB !	 r#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )zGets an ScopeRBACRoleBinding resource from the GKEHub API.

Args:
  name: the full rolebinding resource name.

Returns:
  An ScopeRBACRoleBinding resource

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   )r   7GkehubProjectsLocationsScopesRbacrolebindingsGetRequestr   *projects_locations_scopes_rbacrolebindingsr2   r3   s      r    GetScopeRBACRoleBinding#FleetClient.GetScopeRBACRoleBinding  s>     --
O
O P C ;;AAEEcJJr#   c                    U(       a  U R                   R                  US9nOJU R                   R                  U R                   R                  R                  UR                  5       5      S9nU R                   R	                  UUUUUS9n[
        R                  R                  USSS9n	U R                   R                  UU	R                  5       U	R                  5       R                  5       S9n
U R                  R                  R                  U
5      n[
        R                  R                  UR                  SS	9n[         R"                  " [         R$                  " U R                  R                  U R                  R&                  5      US
5      $ )a  Creates an ScopeRBACRoleBinding resource from the GKEHub API.

Args:
  name: the full Scoperbacrolebinding resource name.
  role: the role.
  custom_role: the custom role.
  user: the user.
  group: the group.
  labels: labels for the RBACRoleBinding resource.

Returns:
  An ScopeRBACRoleBinding resource

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
  calliope_exceptions.RequiredArgumentException: if a required field is
    missing

customRoler@  )r/   rC  rD  rE  r   z1gkehub.projects.locations.scopes.rbacrolebindingsrF  rG  rI  rN   rO   z)Waiting for rbacrolebinding to be created)r   rM  rN  rO  rL  r   rQ   rR   :GkehubProjectsLocationsScopesRbacrolebindingsCreateRequestrQ  rR  rS  r   ri  r)   r/   r	   r   r   r   )r   r/   rC  custom_rolerD  rE  r   roledefrU  r   r+   rK   r   s                r    CreateScopeRBACRoleBinding&FleetClient.CreateScopeRBACRoleBinding  sg   * ""k":g""++IIjjl # g
 --// 0 K !!33; 4 H
 --
R
R#"--/ --/ S C
 
	?	?	F	Fs	KB$$66
B 7 K >>##KKBBKK55	
 	3 r#   c                 N   U R                   R                  US9nU R                  R                  R	                  U5      n[
        R                  R                  UR                  SS9n[        R                  " [        R                  " U R                  R                  5      US5      $ )zDeletes an ScopeRBACRoleBinding resource from the fleet.

Args:
  name: the resource name of the rolebinding.

Returns:
  An operation

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   rN   rO   z)Waiting for rbacrolebinding to be deleted)r   :GkehubProjectsLocationsScopesRbacrolebindingsDeleteRequestr   ri  rH   r   rQ   rR   r/   r	   r   r   r   r   r/   r+   rK   r   s        r    DeleteScopeRBACRoleBinding&FleetClient.DeleteScopeRBACRoleBindingO  s     --
R
R S C 
	?	?	F	Fs	KB$$66
B 7 K >>..KK55	
 	3 r#   c                    SnU(       a  U R                   R                  US9nU(       aJ  U R                   R                  U R                   R                  R                  UR                  5       5      S9nU R                   R	                  UUUUUS9n	U R                   R                  XR                  US9n
U R                  R                  R                  U
5      n[        R                  R                  UR                  SS9n[        R                  " [        R                  " U R                  R                  U R                  R                   5      US5      $ )	a  Updates an ScopeRBACRoleBinding resource in the fleet.

Args:
  name: the rolebinding name.
  user: the user.
  group: the group.
  role: the predefined role.
  custom_role: the custom role.
  labels: labels for the RBACRoleBinding resource.
  mask: a mask of the fields to update.

Returns:
  An operation

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
Nrm  r@  )r/   rD  rE  rC  r   r]  rN   rO   z)Waiting for rbacrolebinding to be updated)r   rM  rN  rO  rL  9GkehubProjectsLocationsScopesRbacrolebindingsPatchRequestr/   r   ri  rA   r   rQ   rR   r	   r   r   r   )r   r/   rD  rE  rC  rp  r   rB   rq  rU  r+   rK   r   s                r    UpdateScopeRBACRoleBinding&FleetClient.UpdateScopeRBACRoleBindingj  s8   ( G""k":g""++IIjjl # g --// 0 K 	OO'.>.>4 	P 	
 
 
	?	?	E	Ec	JB$$66
B 7 K >>##KKBBKK55	
 	3 r#   c                     U R                   R                  S[        R                  " X5      S9n[        R
                  " U R                  R                  USSS9$ )a2  Lists rolebindings in a scope.

Args:
  project: the project containing the scope to list rolebindings from.
  scope: the scope to list rolebindings from.

Returns:
  A ListscopeResponse (list of rolebindings and next page token)

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   r   rb  Nr   )r   8GkehubProjectsLocationsScopesRbacrolebindingsListRequestr   ScopeRBACRoleBindingParentNamer   r   r   ri  )r   r   r   r+   s       r    ListScopeRBACRoleBindings%FleetClient.ListScopeRBACRoleBindings  s]     	NN66wF 	O 	
  ##>> !	 r#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )zGets a Membership-Binding resource from the GKEHub API.

Args:
  name: the full membership-binding resource name.

Returns:
  A Membership-Binding resource

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   )r   4GkehubProjectsLocationsMembershipsBindingsGetRequestr   'projects_locations_memberships_bindingsr2   r3   s      r    GetMembershipBinding FleetClient.GetMembershipBinding  s>     --
L
L M C ;;>>BB3GGr#   c                 B   U R                   R                  XUS9n[        R                  R	                  USSS9nU R                   R                  UUR                  5       UR                  5       R                  5       S9nU R                  R                  R                  U5      n[        R                  R	                  UR                  SS9n[        R                  " [        R                  " U R                  R                  U R                  R                   5      US5      $ )	a  Creates a Membership-Binding resource from the GKEHub API.

Args:
  name: the full binding resource name.
  scope: the Scope to be associated with Binding.
  labels: labels for the membership binding resource

Returns:
  A Membership-Binding resource

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
  calliope_exceptions.RequiredArgumentException: if a required field is
    missing
r/   r   r   z.gkehub.projects.locations.memberships.bindingsrF  rG  )membershipBindingmembershipBindingIdr'   rN   rO   z,Waiting for membership binding to be created)r   MembershipBindingr   rQ   rR   7GkehubProjectsLocationsMembershipsBindingsCreateRequestrQ  rR  rS  r   r  r)   r/   r	   r   r   r   )	r   r/   r   r   bindingr   r+   rK   r   s	            r    CreateMembershipBinding#FleetClient.CreateMembershipBinding  s     mm--v . G !!338 4 H
 --
O
O!$MMO --/ P C
 
	<	<	C	CC	HB$$66
B 7 K >>##KK??KK55	
 	6 r#   c           	          U R                   R                  S[        R                  " XX0R                  5      S9n[
        R                  " U R                  R                  USSS9$ )av  Lists Bindings in a Membership.

Args:
  project: the project containing the Membership to list Bindings from.
  membership: the Membership to list Bindings from.
  location: the Membrship location to list Bindings

Returns:
  A ListMembershipBindingResponse (list of bindings and next page token)

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   r   membershipBindingsNr   )	r   5GkehubProjectsLocationsMembershipsBindingsListRequestr   MembershipBindingParentNamer   r   r   r   r  )r   r   
membershiplocationr+   s        r    ListMembershipBindings"FleetClient.ListMembershipBindings  se     --
M
M//+=+=
 N C ##;;"!	 r#   c                    U R                   R                  UUUS9nU R                   R                  XUR                  US9nU R                  R
                  R                  U5      n[        R                  R                  UR                  SS9n[        R                  " [        R                  " U R                  R
                  U R                  R                  5      US5      $ )a;  Updates a Membership-Binding resource.

Args:
  name: the Binding name.
  scope: the Scope associated with binding.
  labels: the labels for the Membership Binding resource.
  mask: a mask of the fields to update.

Returns:
  An operation

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r  )r  r/   r>   rN   rO   z,Waiting for membership binding to be updated)r   r  6GkehubProjectsLocationsMembershipsBindingsPatchRequestr/   r   r  rA   r   rQ   rR   r	   r   r   r   )	r   r/   r   r   rB   r  r+   rK   r   s	            r    UpdateMembershipBinding#FleetClient.UpdateMembershipBinding  s      mm-- . G
 --
N
N! O C 
	<	<	B	B3	GB$$66
B 7 K >>##KK??KK55	
 	6 r#   c                 N   U R                   R                  US9nU R                  R                  R	                  U5      n[
        R                  R                  UR                  SS9n[        R                  " [        R                  " U R                  R                  5      US5      $ )zDeletes a Membership-Binding resource.

Args:
  name: the resource name of the Binding.

Returns:
  An operation

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
r   rN   rO   z,Waiting for membership binding to be deleted)r   7GkehubProjectsLocationsMembershipsBindingsDeleteRequestr   r  rH   r   rQ   rR   r/   r	   r   r   r   rv  s        r    DeleteMembershipBinding#FleetClient.DeleteMembershipBinding6  s     --
O
O P C 
	<	<	C	CC	HB$$66
B 7 K >>..KK55	
 	6 r#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )a  Gets a Membership RBAC RoleBinding resource from the GKEHub API.

Args:
  name: the full Membership RBAC RoleBinding resource name.

Returns:
  A Membership RBAC Role Binding resource.

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error.
r   )r   <GkehubProjectsLocationsMembershipsRbacrolebindingsGetRequestr   /projects_locations_memberships_rbacrolebindingsr2   r3   s      r    GetMembershipRbacRoleBinding(FleetClient.GetMembershipRbacRoleBindingQ  s>     --
T
T U C ;;FFJJ3OOr#   c           	         U R                   R                  UU R                   R                  U R                   R                  R                  UR	                  5       5      S9UUS9n[
        R                  R                  USSS9nU R                   R                  UUR                  5       UR                  5       R                  5       S9nU R                  R                  R                  U5      $ )a  Creates a Membership RBAC RoleBinding resource from the GKEHub API.

Args:
  name: the full Membership RBAC Role Binding resource name.
  role: the role for the RBAC policies.
  user: the user to apply the RBAC policies for.
  group: the group to apply the RBAC policies for.

Returns:
  A Membership RBAC Role Binding resource.

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error.
r@  rB  6gkehub.projects.locations.memberships.rbacrolebindingsrF  rG  rI  )r   rL  rM  rN  rO  r   rQ   rR   ?GkehubProjectsLocationsMembershipsRbacrolebindingsCreateRequestrQ  rR  rS  r   r  r)   rT  s           r    CreateMembershipRbacRoleBinding+FleetClient.CreateMembershipRbacRoleBindingb  s     --//]]==--KK

   

  0 	K !!33@ 4 H
 --
W
W#"--/ --/ X C
 ;;FFMM r#   c                 ~    U R                   R                  US9nU R                  R                  R	                  U5      $ )zDeletes a Membership RBAC RoleBinding resource.

Args:
  name: the resource name of the Membership RBAC RoleBinding.

Returns:
  A long running operation for the deletion.

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error.
r   )r   ?GkehubProjectsLocationsMembershipsRbacrolebindingsDeleteRequestr   r  rH   r3   s      r    DeleteMembershipRbacRoleBinding+FleetClient.DeleteMembershipRbacRoleBinding  sC     --
W
W X C ;;FFMM r#   c           	         U R                   R                  UU R                   R                  U R                   R                  R                  UR	                  5       5      S9UUS9n[
        R                  R                  USSS9nU R                   R                  UUR                  5       UR                  5       R                  5       S9nU R                  R                  R                  U5      $ )a  Gets YAML containing RBAC policies for a membership RBAC role binding.

Args:
  name: the full Membership RBAC Role Binding resource name.
  role: the role for the RBAC policies.
  user: the user to apply the RBAC policies for.
  group: the group to apply the RBAC policies for.

Returns:
  YAML text containing RBAC policies for a membership RBAC rolebinding.

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error.
r@  rB  r  rF  rG  rI  )r   rL  rM  rN  rO  r   rQ   rR   ^GkehubProjectsLocationsMembershipsRbacrolebindingsGenerateMembershipRBACRoleBindingYAMLRequestrQ  rR  rS  r   r  %GenerateMembershipRBACRoleBindingYAMLrT  s           r    %GenerateMembershipRbacRoleBindingYaml1FleetClient.GenerateMembershipRbacRoleBindingYaml  s     --//]]==--KK

   

  0 	K !!33@ 4 H
 --
v
v#"--/ --/ w C
 ;;FFll r#   c                 L    U R                   R                  R                  U5      $ )zCreates a rollout resource from the Fleet rollout API.

Args:
  req: An HTTP create rollout request to be sent to the API server.

Returns:
  A long-running operation.

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
)r   projects_locations_rolloutsr)   r   s     r    CreateRolloutFleetClient.CreateRollout  s     ;;2299#>>r#   c                 L    U R                   R                  R                  U5      $ )zDescribes a fleet rollout.)r   r  r2   r   s     r    DescribeRolloutFleetClient.DescribeRollout  s     ;;2266s;;r#   c           	      \    [         R                  " U R                  R                  USUUSS9$ )zLists fleet rollouts.rolloutspageSizer   
batch_sizelimitr   )r   r   r   r  r   r+   	page_sizer  s       r    ListRolloutsFleetClient.ListRollouts  s3     ##//' r#   c                 L    U R                   R                  R                  U5      $ )zPause a fleet rollout.)r   r  Pauser   s     r    PauseRolloutFleetClient.PauseRollout  s     ;;2288==r#   c                 L    U R                   R                  R                  U5      $ )zResume a fleet rollout.)r   r  Resumer   s     r    ResumeRolloutFleetClient.ResumeRollout       ;;2299#>>r#   c                 L    U R                   R                  R                  U5      $ )zDelete a fleet rollout.)r   r  rH   r   s     r    DeleteRolloutFleetClient.DeleteRollout  r  r#   c                 L    U R                   R                  R                  U5      $ )zCreates a rollout sequence resource.

Args:
  req: An HTTP create rollout sequence request to be sent to the API server.

Returns:
  A long-running operation.

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error
)r   #projects_locations_rolloutSequencesr)   r   s     r    CreateRolloutSequence!FleetClient.CreateRolloutSequence  s     ;;::AA#FFr#   c                 L    U R                   R                  R                  U5      $ )zDescribes a rollout sequence.)r   r  r2   r   s     r    DescribeRolloutSequence#FleetClient.DescribeRolloutSequence  s     ;;::>>sCCr#   c           	      \    [         R                  " U R                  R                  USUUSS9$ )zLists rollout sequences.rolloutSequencesr  r  )r   r   r   r  r  s       r    ListRolloutSequences FleetClient.ListRolloutSequences  s3     ##77 ' r#   c                 L    U R                   R                  R                  U5      $ )zIUpdates a RolloutSequence and returns the long-running operation message.)r   r  rA   r   s     r    UpdateRolloutSequence!FleetClient.UpdateRolloutSequence!  s     ;;::@@EEr#   c                 L    U R                   R                  R                  U5      $ )zDeletes a rollout sequence.)r   r  rH   r   s     r    DeleteRolloutSequence!FleetClient.DeleteRolloutSequence'  s     ;;::AA#FFr#   )r   r   r   r   r   )NNr   NNrW   )global)Rrz   r{   r|   r}   r~   r
   r   r   r!   r   r   *GkehubProjectsLocationsFleetsCreateRequestr   *GkehubProjectsLocationsFleetsDeleteRequestr   r   )GkehubProjectsLocationsFleetsPatchRequestr   r   r   r   r   r   r   r   r   r  r  r  r  r  r$  r+  r/  r3  r8  r=  rV  rZ  r_  re  rj  rr  rw  r{  r  r  r  r  r  r  r  r  r  r  ,GkehubProjectsLocationsRolloutsCreateRequestr  )GkehubProjectsLocationsRolloutsGetRequestRolloutr  *GkehubProjectsLocationsRolloutsListRequestRolloutGeneratorr  +GkehubProjectsLocationsRolloutsPauseRequestr  ,GkehubProjectsLocationsRolloutsResumeRequestr  ,GkehubProjectsLocationsRolloutsDeleteRequestr  4GkehubProjectsLocationsRolloutSequencesCreateRequestr  1GkehubProjectsLocationsRolloutSequencesGetRequestRolloutSequencer  2GkehubProjectsLocationsRolloutSequencesListRequestRolloutSequenceGeneratorr  3GkehubProjectsLocationsRolloutSequencesPatchRequestr  4GkehubProjectsLocationsRolloutSequencesDeleteRequestr  r   r   r#   r    r   r   C  s~    $(#4#4#7#7 :"=UMM ==AA=="<@@<<"8:C"C,.20 BD#JE$ IM&P8 FH'R,>$!F8#J,O"'R&Q@.K$ :>9v65n4H"(T6#J6P"%N&%N?CC? <@@<}}< 	;;
  >BB>?CC??CC?GKKG DHHDD 	CC
 %% FJJFGKKGr#   r   c                       \ rS rSrSrS\R                  4S jrS\R                  4S jr
S\R                  4S jr  SS\R                  S
\\R                   S	S	4   4S jjrSrg	)OperationClienti.  z3Client for the GKE Hub API long-running operations.r   c                     [         R                  " U5      U l        [         R                  " US9U l        U R                  R
                  U l        g )N)r   )r   r   r   r   r   r   servicer   s     r    r!   OperationClient.__init__1  s7    **=9DM((}EDK;;<<DLr#   operation_refc                     [         R                  " [         R                  " U R                  5      USR	                  UR                  5       5      SSS9$ )a  Waits for a long-running operation to complete.

Polling message is printed to the terminal periodically, until the operation
completes or times out.

Args:
  operation_ref: Long-running peration in the format of resource argument.

Returns:
  A completed long-running operation.
z&Waiting for operation [{}] to completei'  i .)wait_ceiling_msmax_wait_ms)r	   r   r   r  formatrS  )r   r  s     r    WaitOperationClient.Wait6  sL     >>..t||<077&&(	
  r#   r+   c                 L    U R                   R                  R                  U5      $ )z#Describes a long-running operation.)r   r   r2   r   s     r    DescribeOperationClient.DescribeL  s    ;;4488==r#   NrL   c           	      \    [         R                  " U R                  R                  USUUSS9$ )a!  Lists long-running operations.

Currently gcloud implements client-side filtering and limiting behavior.

Args:
  req: List request to pass to the server.
  page_size: Maximum number of resources per page.
  limit: Client-side limit control.

Returns:
  A list of long-running operations.

operationsr  r  )r   r   r   r   r  s       r    r8   OperationClient.ListP  s3    $ ##11' r#   )r   r   r  r  )rz   r{   r|   r}   r~   r
   r   r!   r   r   r  r   +GkehubProjectsLocationsOperationsGetRequestr  ,GkehubProjectsLocationsOperationsListRequestr   r   r8   r   r   r#   r    r  r  .  su    ;=D$5$5 =
	 2 2 ,>%KK > 	==
 $,- r#   r  )r~   r_   typingr   apitools.base.pyr   r   &googlecloudsdk.api_lib.container.fleetr   r   r   googlecloudsdk.api_lib.utilr	   googlecloudsdk.callioper
   googlecloudsdk.corer   objectr   r   r   r  r   r#   r    <module>r     sg    )   % ' B 8 7 . ( )uL uLpiK& iKXhG& hGV'; ;r#   