
    m                        d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 ddlmZ dd	lmZ ddlmZ dd
lmZ ddlmZ ddlmZ dZd8dZd8dZd Zd8dZd9dZd Zd Zd Zd Zd Z d Z!d Z"d Z#d Z$d Z%d Z&d Z'd  Z(d! Z)d" Z*d8d#Z+d$ Z,d% Z-d& Z.d' Z/d( Z0d) Z1d* Z2d+ Z3d, Z4d- Z5ejl                  jn                  dfd.Z8d/ Z9d9d0Z:d8d1Z;d9d2Z<d3 Z=d4 Z>d5 Z?d8d6Z@y7):z>Flags and helpers for the Cloud NetApp Files Volumes commands.    )absolute_import)division)unicode_literals)util)actions)arg_parsers)base)flags)	arg_utils)labels_util)concept_parsersz    table(
        name.basename():label=VOLUME_NAME:sort=1,
        name.segment(3):label=LOCATION,
        storagePool,
        capacityGib:label=CAPACITY_GB,
        serviceLevel,
        shareName,
        state
    )c                     t         j                  j                  dt        j                         d|ddi      j                  |        y )Nz--storage-poolz*The Storage Pool to associate with Volume.location )requiredflag_name_overrides)r   ConceptParserForResourcer
   GetStoragePoolResourceSpecAddToParserparserr   s     6lib/googlecloudsdk/command_lib/netapp/volumes/flags.py!AddVolumeAssociatedStoragePoolArgr   .   sD    ++&&(2%r* ,  K    c                 x    t         t         d}d}| j                  dt        j                  |dg      ||       y)zAdds a --network arg to the given parser.

  Args:
    parser: argparse parser.
    required: bool whether arg is required or not
  )namez	psa-rangea          Network configuration for a Cloud NetApp Files Volume. Specifying
        `psa-range` is optional.
        *name*::: The name of the Google Compute Engine
        [VPC network](/compute/docs/networks-and-firewalls#networks) to which
        the volume is connected.
        *psa-range*::: This field is not implemented. The values provided in
        this field are ignored.
  z	--networkr   )specrequired_keystyper   helpN)stradd_argumentr   ArgDict)r   r   network_arg_specnetwork_helps       r   AddVolumeNetworkArgr(   8   sJ     
, 	$4VHM	  r   c                 X    t        j                  | |j                  j                        S )zReturns the Choice Enum for Protocols.

  Args:
    choice: The choice for protocol input as string
    messages: The messages module.

  Returns:
    the protocol enum
  choice	enum_type)r   ChoiceToEnumVolume!ProtocolsValueListEntryValuesEnumr+   messagess     r   GetVolumeProtocolEnumFromArgr2   W   s&     
		xPP
 r   c                 b    | j                  dt        j                  dt              |dd       y)z)Adds the Protocols arg to the arg parser.z--protocols   
min_lengthelement_typePROTOCOLzType of File System protocols for the Cloud NetApp Files Volume. Valid component values are:
            `NFSV3`, `NFSV4`, `SMB`.)r!   r   metavarr"   Nr$   r   ArgListr#   r   s     r   AddVolumeProtocolsArgr<   f   s3    !#>(  r   Fc                 6    | j                  dt        |d       y)z*Adds the Share name arg to the arg parser.z--share-namez.Share name of the Mount path clients will use.r    Nr$   r#   r   s     r   AddVolumeShareNameArgr?   s   s!    ?	  r   c                    t         t         t         t        j                  t        j                  t        j
                        t        j                  t        j                  t        j
                        t        j                  t        j                  t        j
                        t        j                  t        j                  t        j
                        t        j                  t        j                  t        j
                        t        j                  t        j                  t        j
                        t        j                  t        j                  t        j
                        t        j                  t        j                  t        j
                        d}d}| j                  dt        j                  |      d|       y)	zjAdds the Export Policy (--export-policy) arg to the given parser.

  Args:
    parser: argparse parser.
  truthy_stringsfalsey_strings)zallowed-clientszhas-root-accesszaccess-typezkerberos-5-read-onlyzkerberos-5-read-writezkerberos-5i-read-onlyzkerberos-5i-read-writezkerberos-5p-read-writezkerberos-5p-read-onlynfsv3nfsv4a          Export Policy of a Cloud NetApp Files Volume.
        This will be a field similar to network
        in which export policy fields can be specified as such:
        `--export-policy=allowed-clients=ALLOWED_CLIENTS_IP_ADDRESSES,
        has-root-access=HAS_ROOT_ACCESS_BOOL,access=ACCESS_TYPE,nfsv3=NFSV3,
        nfsv4=NFSV4,kerberos-5-read-only=KERBEROS_5_READ_ONLY,
        kerberos-5-read-write=KERBEROS_5_READ_WRITE,
        kerberos-5i-read-only=KERBEROS_5I_READ_ONLY,
        kerberos-5i-read-write=KERBEROS_5I_READ_WRITE,
        kerberos-5p-read-only=KERBEROS_5P_READ_ONLY,
        kerberos-5p-read-write=KERBEROS_5P_READ_WRITE`
  z--export-policyr   append)r!   actionr"   N)r#   r   
ArgBooleannetapp_utiltruthyfalseyr$   r%   )r   export_policy_arg_specexport_policy_helps      r   AddVolumeExportPolicyArgrO   }   sP    )44$++K<N<N  +55$++K<N<N   +55$++K<N<N  !, 6 6$++K<N<N! !, 6 6$++K<N<N!  +55$++K<N<N  %%$++K<N<N %%$++K<N<N3: 	$:;	  r   c                 4    | j                  dt        d       y)z0Adds the Unix Permissions arg to the arg parser.z--unix-permissionszrUnix permissions the mount point will be created with. Unix permissions are only applicable with NFS protocol onlyr!   r"   Nr>   r   s    r   AddVolumeUnixPermissionsArgrS      s     ?  r   c                 X    t        j                  | |j                  j                        S )zReturns the Choice Enum for SMB Setting.

  Args:
    choice: The choice for SMB setting input as string
    messages: The messages module.

  Returns:
    The choice arg.
  r*   )r   r-   r.   #SmbSettingsValueListEntryValuesEnumr0   s     r   GetVolumeSmbSettingsEnumFromArgrV      s'     
		CC
 r   c                 `    | j                  dt        j                  dt              dd       y)z.Adds the --smb-settings arg to the arg parser.z--smb-settingsr4   r5   SMB_SETTINGa  List of settings specific to SMB protocol for a Cloud NetApp Files Volume. Valid component values are:
  `ENCRYPT_DATA`, `BROWSABLE`, `CHANGE_NOTIFY`, `NON_BROWSABLE`,
  `OPLOCKS`, `SHOW_SNAPSHOT`, `SHOW_PREVIOUS_VERSIONS`,
  `ACCESS_BASED_ENUMERATION`, `CONTINUOUSLY_AVAILABLE`.r!   r9   r"   Nr:   rR   s    r   AddVolumeSmbSettingsArgrZ      s0    !#>;	  
r   c                 r    t         t         d}d}| j                  dt        j                  |      |       y)z1Adds the --snapshot-hourly arg to the arg parser.)snapshots-to-keepminutez<
  Make a snapshot every hour e.g. at 04:00, 05:20, 06:00
  z--snapshot-hourlyrF   rQ   Nfloatr$   r   r%   )r   hourly_snapshot_arg_spechourly_snapshot_helps      r   AddVolumeHourlySnapshotArgrb      sD     ! 	$<=  r   c                 |    t         t         t         d}d}| j                  dt        j                  |      |       y)z0Adds the --snapshot-daily arg to the arg parser.)r\   r]   hourz;
  Make a snapshot every day e.g. at 06:00, 05:20, 23:50
  z--snapshot-dailyrF   rQ   Nr^   )r   daily_snapshot_arg_specdaily_snapshot_helps      r   AddVolumeDailySnapshotArgrg      sG     !
 	$;<  r   c                     t         t         t         t        d}d}| j                  dt        j                  |      |       y)z1Adds the --snapshot-weekly arg to the arg parser.r\   r]   rd   dayzV
  Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20,
  Sunday 23:50
  z--snapshot-weeklyrF   rQ   Nr_   r#   r$   r   r%   )r   weekly_snapshot_arg_specweekly_snapshot_helps      r   AddVolumeWeeklySnapshotArgrn      sJ     !	 	$<=  r   c                     t         t         t         t        d}d}| j                  dt        j                  |      |       y)z3Addss the --snapshot-monthly arg to the arg parser.ri   zK
  Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50
  z--snapshot-monthlyrF   rQ   Nrk   )r   monthly_snapshot_arg_specmonthly_snapshot_helps      r   AddVolumeMonthlySnapshotArgrr     sJ     !	 	$=>   r   c                 f    t        j                  ddd      }| j                  dt        d|       y)	z.Adds the --snap-reserve arg to the arg parser.zsnap-reservez$The {flag_name} option is deprecatedF)warnremovedz--snap-reservezmThe percentage of volume storage reserved for snapshot storage.
      The default value for this is 0 percent)r!   r"   rH   N)r   DeprecationActionr$   r_   )r   rH   s     r   AddVolumeSnapReserveArgrw   $  s=    $$A5& 	1  r   c                     | j                  dt        j                  t        j                  t        j
                        dd       y)z4Adds the --snapshot-directory arg to the arg parser.z--snapshot-directoryrA   truezSnapshot Directory if enabled (true) makes the Volume
            contain a read-only .snapshot directory which provides access
            to each of the volume's snapshots
          )r!   defaultr"   Nr$   r   rI   rJ   rK   rL   rR   s    r   AddVolumeSnapshotDirectoryArgr|   2  sA    !!$++K<N<N   
r   c                 X    t        j                  | |j                  j                        S )zReturns the Choice Enum for Security style.

  Args:
    choice: The choice for Security style input as string
    messages: The messages module.

  Returns:
    The choice arg.
  r*   )r   r-   r.   SecurityStyleValueValuesEnumr0   s     r   !GetVolumeSecurityStyleEnumFromArgr   A  s&     
		xKK
 r   c                     t        j                  d|j                  j                  ddddd      }|j                  j                  |        y)	z0Adds the --security-style arg to the arg parser.z--security-stylezUThe security style of the Volume. This can either be
          UNIX or NTFS.
        )unixzUNIX security style for Volume)ntfszNTFS security style for Volume.)UNIXNTFSSECURITY_STYLE_UNSPECIFIED)help_strcustom_mappingsrz   N)r   ChoiceEnumMapperr.   r~   
choice_argr   )r   r1   security_style_args      r   AddVolumeSecurityStyleArgr   P  sQ     11oo22 AA + ++F3r   c                     | j                  dt        j                  t        j                  t        j
                        d       y)z1Adds the --enable-kerberos arg to the arg parser.z--enable-kerberosrA   zBBoolean flag indicating whether Volume is a kerberos Volume or notrQ   Nr{   rR   s    r   AddVolumeEnableKerberosArgr   a  s=    !!$++K<N<N T  r   c                     | j                  dt        j                  t        j                  t        j
                        d       y)z-Adds the --enable-ladp arg to the arg parser.z--enable-ldaprA   zBBoolean flag indicating whether Volume is a NFS LDAP Volume or notrQ   Nr{   rR   s    r   AddVolumeEnableLdapArgr   l  s=    !!$++K<N<N T  r   c                 ,    | j                  ddd       y)z'Adds the --force arg to the arg parser.z--force
store_truezKForces the deletion of a volume and its child resources, such as snapshots.)rH   r"   N)r$   rR   s    r   AddVolumeForceArgr   w  s    \  r   c                     t         j                  j                  dt        j                  dd      |dddd      j                  |        y	)
z*Adds the --snapshot arg to the arg parser.z
--snapshotTFsource_snapshot_op
positionalr   r   volumez*The Snapshot to revert the Volume back to.r   r   
group_helpNr   r   r   r
   GetSnapshotResourceSpecr   r   s     r   AddVolumeRevertSnapshotArgr     sH    ++##tN')R8= ,  Kr   c                     t         j                  j                  dt        j                  dd      dddd      j                  |        y	)
z1Adds the --source-snapshot arg to the arg parser.z--source-snapshotTFr   r   r   z.The source Snapshot to create the Volume from.r   r   Nr   rR   s    r   AddVolumeSourceSnapshotArgr     sE    ++##tN')R8A	 , 
 Kr   c                     t         j                  j                  dt        j                  d      ddid      j                  |        y)	z/Adds the --source-backup arg to the arg parser.z--source-backupFr   r   r   z,The source Backup to create the Volume from.r   Nr   r   r   r
   GetBackupResourceSpecr   rR   s    r   AddVolumeSourceBackupArgr     sC    ++!!U3%r*?	 , 
 Kr   c                 X    t        j                  | |j                  j                        S )zReturns the Choice Enum for Restricted Actions.

  Args:
      choice: The choice for restricted actions input as string.
      messages: The messages module.

  Returns:
      the Restricted Actions enum.
  r*   )r   r-   r.   )RestrictedActionsValueListEntryValuesEnumr0   s     r   %GetVolumeRestrictedActionsEnumFromArgr     s'     
		II
 r   c                 `    | j                  dt        j                  dt              dd       y)z4Adds the --restricted-actions arg to the arg parser.z--restricted-actionsr4   r5   RESTRICTED_ACTIONz_Actions to be restricted for a volume. Valid restricted action options are:
          'DELETE'.rY   Nr:   rR   s    r   AddVolumeRestrictedActionsArgr     s0    !#>!	  r   c                 X    t        j                  | |j                  j                        S )zReturns the Choice Enum for OS Type.

  Args:
    choice: The choice for OS Type input as string.
    messages: The messages module.

  Returns:
    the OS Type enum.
  r*   )r   r-   BlockDeviceOsTypeValueValuesEnumr0   s     r   GetOsTypeEnumFromArgr     s)     
		$$::
 r   c                    t        j                  dt        d      t        t        j                  t        j
                  t        j                        d}d}| j                  dt        j                  |      |	       y
)z/Adds the --backup-config arg to the arg parser.r4   #r6   r7   custom_delim_charrA   )zbackup-policieszbackup-vaultzenable-scheduled-backupsa  Backup Config contains backup related config on a volume.

    Backup Config will have the following format
    `--backup-config=backup-policies=BACKUP_POLICIES,
    backup-vault=BACKUP_VAULT_NAME,
    enable-scheduled-backups=ENABLE_SCHEDULED_BACKUPS

backup-policies is a pound-separated (#) list of backup policy names, backup-vault can include
a single backup-vault resource name, and enable-scheduled-backups is a Boolean value indicating
whether or not scheduled backups are enabled on the volume.
  z--backup-configrF   rQ   N)	r   r;   r#   rI   rJ   rK   rL   r$   r%   )r   backup_config_arg_specbackup_config_helps      r   AddVolumeBackupConfigArgr     sw     %,,SC "-"8"8$++K<N<N# 	$:;  r   c                     | j                  dt        j                  t        j                  t        j
                        d       y)z0Adds the --large-capacity arg to the arg parser.z--large-capacityrA   zHBoolean flag indicating whether Volume is a large capacity Volume or notrQ   Nr{   rR   s    r   AddVolumeLargeCapacityArgr     s=    !!$++K<N<N Z  r   c                     | j                  dt        j                  t        j                  t        j
                        d       y)z4Adds the --multiple-endpoints arg to the arg parser.z--multiple-endpointsrA   zLBoolean flag indicating whether Volume is a multiple endpoints Volume or notrQ   Nr{   rR   s    r   AddVolumeMultipleEndpointsArgr     s=    !!$++K<N<N ^  r   c                     t         t        j                  dt         d      |j                  j                  t
        d}d}| j                  dt        j                  |      d|d	
       y)z/Adds the --block-devices arg to the arg parser.r4   r   r   )r   zhost-groupszos-typezsize-giba       A block device to be created with the volume.

    This flag can be repeated to specify multiple block devices.

    The following keys are available:
    *name*::: A user-defined name for the block device.
    *host-groups*::: A comma-separated list of host groups that can mount the block volume.
    *os-type*::: The OS type of the volume. Allowed values are `OS_TYPE_UNSPECIFIED`, `LINUX`, `WINDOWS`.
    *size-gib*::: The size of the block device in GiB. Note that this value is ignored during volume creation and is system-managed.
  z--block-devicesrF   rG   T)r!   rH   r"   hiddenN)r#   r   r;   r   r   intr$   r%   )r   r1   block_device_arg_specblock_devices_helps       r   AddVolumeBlockDevicesArgr      sq      ((SCA%%;;
 	$&  r   c                    |t         j                  j                  k(  s|t         j                  j                  k(  rP|j                  j
                  t        t        j                  t        j                  t        j                        d}n|j                  j
                  t        d}d}| j                  dt        j                  |      d|       y	)
z0Adds the --tiering-policy arg to the arg parser.rA   )tier-actioncooling-threshold-dayszenable-hot-tier-bypass-mode)r   r   a        Tiering Policy contains auto tiering policy on a volume.

      Tiering Policy will have the following format
      --tiering-policy=tier-action=TIER_ACTION,
      cooling-threshold-days=COOLING_THRESHOLD_DAYS

      tier-action is an enum, supported values are ENABLED or PAUSED,
cooling-threshold-days is an integer represents time in days to mark the
volume's data block as cold and make it eligible for tiering,
can be range from 7-183. Default is 31.
  z--tiering-policyrF   ztier-action=ENABLED|PAUSEDrY   N)calliope_baseReleaseTrackBETAALPHATieringPolicyTierActionValueValuesEnumr   r   rI   rJ   rK   rL   r$   r%   )r   r1   release_tracktiering_policy_arg_spectiering_policy_helps        r   AddVolumeTieringPolicyArgr     s    }11666}11777--GG"%'2'='=&--&--(
  --GG"% 	$;<*	  r   c                 h   ~t         t         t         t         t        j                  dt         d      t         t         |j                  j                  |j                  j
                  t        t        j                  dt         d      d}d}| j                  dt        j                  |      ||       y	)
z?Adds the --hybrid-replication-parameters arg to the arg parser.r4   r   r   )replicationpeer-volume-namepeer-cluster-namepeer-svm-namepeer-ip-addresseszcluster-locationdescriptionzreplication-schedulezhybrid-replication-typezlarge-volume-constituent-countlabelsa    Hybrid Replication Parameters contains hybrid replication parameters on a volume.

      Hybrid Replication Parameters will have the following format
      --hybrid-replication-parameters=replication=REPLICATION,
      peer-volume-name=PEER_VOLUME_NAME,
      peer-cluster-name=PEER_CLUSTER_NAME,
      peer-svm-name=PEER_SVM_NAME,
      peer-ip-addresses=[PEER-IP-ADDRESS1#PEER-IP-ADDRESS2#...],
      cluster-location=CLUSTER_LOCATION,
      description=DESCRIPTION,
      replication-schedule=REPLICATION_SCHEDULE,
      hybrid-replication-type=HYBRID_REPLICATION_TYPE,
      large-volume-constituent-count=LARGE_VOLUME_CONSTITUENT_COUNT,
      labels=[KEY1:VALUE1#KEY2:VALUE2#...],

  replication is the desired name for the replication of the volume,
  peer-volume-name is the name of the user's local source volume,
  peer-cluster-name is the name of the user's local source cluster,
  peer-svm-name is the name of the user's local source vserver svm,
  peer-ip-addresses is a ampersand-separated(#) list of ip addresses,
  cluster-location is the name of the source cluster location,
  description is the description of the replication,
  replication-schedule is the schedule of corresponding hybrid replication
  created, hybrid-replication-type is the hybrid replication type of the
  corresponding hybrid replication created, large-volume-constituent-count
  is the number of constituent volumes in the large volume, and labels is an
  hashtag-separated(#) key value pair of labels with key and value separated
  by colon(:) for the replication.
      z--hybrid-replication-parametersrF   r!   r"   r   N)	r#   r   r;   HybridReplicationParameters"ReplicationScheduleValueValuesEnum$HybridReplicationTypeValueValuesEnumr   r$   r%   )r   r1   r   r   &hybrid_replication_parameters_arg_spec"hybrid_replication_parameters_helps         r   'AddVolumeHybridReplicationParametersArgr   C  s     &..SC 

.
.
Q
Q 
.
.
S
S(+##SC#,(,(
$< 	'$JK-	  r   c                 4    | j                  dt        d       y)z2Adds the --throughput-mibps arg to the arg parser.z--throughput-mibpsz.The desired throughput of the volume in MiB/s.rQ   N)r$   r_   rR   s    r   AddVolumeThroughputMibpsArgr     s    ;  r   c           	      h   t         t         t         t        j                  dt         d      t        j                  t        j
                  t        j                        t        j                  t        j                         d      d}d}| j                  dt        j                  |	      ||
       y)z2Adds the --cache-parameters arg to the arg parser.r4   r   r   rA   )r7   r   )r   r   r   r   zenable-global-file-lockzcache-configaQ    Cache Parameters contains cache parameters of a volume.

      Cache Parameters will have the following format
      `--cache-parameters=peer-volume-name=PEER_VOLUME_NAME,
        peer-cluster-name=PEER_CLUSTER_NAME,
        peer-svm-name=PEER_SVM_NAME,
        peer-ip-addresses=[PEER-IP-ADDRESS1#PEER-IP-ADDRESS2#...],
        enable-global-file-lock=ENABLE_GLOBAL_FILE_LOCK,
        cache-config=CACHE_CONFIG`

      *peer-volume-name*::: Name of the user's local source volume
      *peer-cluster-name*::: Name of the user's local source cluster
      *peer-svm-name*::: Name of the user's local source vserver svm
      *peer-ip-addresses*::: Hashtag-separated(#) list of IP addresses
      *enable-global-file-lock*::: If true, enable global file lock
      *cache-config*::: Cache-config as a hashtag-separated(#) list of key-value pairs
  z--cache-parametersrF   r   N)	r#   r   r;   rI   rJ   rK   rL   r%   r$   )r   r   cache_parameters_arg_speccache_parameters_helps       r   AddVolumeCacheParametersArgr     s     &..SC "-!7!7$++K<N<N" "))"**,$ 	$=> 	  r   c                 b    | j                  dt        j                  dt              d|d       y)z+Adds the --file-list arg to the arg parser.z--file-listr4   r5   	FILE_LISTzTList of files to be restored in the form of their absolute path as in source volume.)r!   r9   r   r"   Nr:   r   s     r   AddVolumeRestoreFileListArgr     s1    !#>e  r   c                 6    | j                  dt        |d       y)z:Adds the --restore-destination-path arg to the arg parser.z--restore-destination-pathz?Name of the absolute directory path in the destination volume..r    Nr>   r   s     r   "AddVolumeRestoreDestinationPathArgr     s!    "P	  r   c                 V   t        j                  t        j                  d      g      j	                  |        t        j                  |      }t        j                  | d       t        j                  | d       t        |        t        j                  |        t        |        t        |        t        |        t        |        t        |        t!        |        t#        |        t%        |        t'        |        t)        |        t+        |        t-        |        t/        | |       t1        |        t3        |        t5        |        t7        |        |t8        j:                  j<                  t8        j:                  j>                  fv rtA        |        tC        |        tE        |        tG        | ||       tI        | ||       tK        |        |t8        j:                  jL                  t8        j:                  j<                  fv rtO        | |       tQ        jR                  |        y)zAdd args for creating a Volume.zThe Volume to create.r   r.   N)*r   r   r
   GetVolumePresentationSpecr   netapp_api_utilGetMessagesModuleAddResourceDescriptionArgAddResourceCapacityArgr   AddResourceAsyncFlagr<   r?   rO   rS   rZ   r   rb   rg   rn   rr   rw   r|   r   r   r   r   r   r   r   r   GAr   r   r   r   r   r   r   r   r   AddCreateLabelsFlagsr   r   r1   s      r   AddVolumeCreateArgsr     s   &&'>?@K..]K(!!&(3vx0#F+V$6"f%&!V$V$F#V$f%&!'FH-V$'F#'  %%}'A'A'D'D  V$V$f%FHm<)&(MJf%  &&(B(B(G(G  VX.""6*r   c                     t        j                  t        j                  d      g      j	                  |        t        j
                  |        t        |        y)zAdd args for deleting a Volume.zThe Volume to delete.N)r   r   r
   r   r   r   r   rR   s    r   AddVolumeDeleteArgsr     sB    &&'>?@KV$Fr   c                     t        j                  t        j                  d      g      j	                  |        t        j                  |      }t        j                  | d       t        j                  | dd       t        | d       t        j                  |        t        | d       t        | d       t        |        t        |        t        |        t!        |        t#        |        t%        |        t'        |        t)        |        t+        |        t-        |        t/        | |       t1        |        t3        |        |t4        j6                  j8                  t4        j6                  j:                  fv rt=        |        t?        |        tA        |        tC        | ||       tE        |        |t4        j6                  jF                  t4        j6                  j8                  fv rtI        | |       tK        jL                  |        y)zAdd args for updating a Volume.zThe Volume to update.r   r.   F)r   N)'r   r   r
   r   r   r   r   r   r   r   r   r<   r?   rO   rS   rZ   r   rb   rg   rn   rr   rw   r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   AddUpdateLabelsFlagsr   s      r   AddVolumeUpdateArgsr     s   &&'>?@K..]K(!!&(3vx%@#FU;V$//6"f%&!V$V$F#V$f%&!'FH-V$'  %%}'A'A'D'D  V$V$f%FHm<f%  &&(B(B(G(G  VX.""6*r   c                     t         j                  j                  dt        j                  d      |ddid      j                  |        y)	z(Adds the --backup arg to the arg parser.z--backupFr   r   r   z<The Backup from which files are restored back to the Volume.r   Nr   r   s     r   AddVolumeRestoreFromBackupArgr   *  sF    ++!!U3%r*O ,  Kr   N)T)F)A__doc__
__future__r   r   r   googlecloudsdk.api_lib.netappr   r   googlecloudsdk.callioper   r   r	   r   !googlecloudsdk.command_lib.netappr
   rJ   $googlecloudsdk.command_lib.util.apisr   $googlecloudsdk.command_lib.util.argsr   (googlecloudsdk.command_lib.util.conceptsr   VOLUMES_LIST_FORMATr   r(   r2   r<   r?   rO   rS   rV   rZ   rb   rg   rn   rr   rw   r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r   r   <module>r     s   E &  ' A + / 9 3 A : < D		 >
5p  "&$4" 	"<<"L %2$>$>$A$A%>B'T(+V%+Pr   