
    m                        S 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
KJr  SSKJr  SSKJr  SrS8S jrS8S jrS rS8S jrS9S 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  r(S! r)S" r*S8S# jr+S$ r,S% r-S& r.S' r/S( r0S) r1S* r2S+ r3S, r4S- r5\Rl                  Rn                  S4S. jr8S/ r9S9S0 jr:S8S1 jr;S9S2 jr<S3 r=S4 r>S5 r?S8S6 jr@g7):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                     [         R                  R                  S[        R                  " 5       SUSS0S9R                  U 5        g )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                 n    [         [         S.nSnU R                  S[        R                  " US/S9UUS9  g)z|Adds 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                 R    [         R                  " XR                  R                  S9$ )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$     
		PP
 r   c                 X    U R                  S[        R                  " S[        S9USSS9  g)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                 0    U R                  S[        USS9  g)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   [         [         [         [        R                  " [        R                  [        R
                  S9[        R                  " [        R                  [        R
                  S9[        R                  " [        R                  [        R
                  S9[        R                  " [        R                  [        R
                  S9[        R                  " [        R                  [        R
                  S9[        R                  " [        R                  [        R
                  S9[        R                  " [        R                  [        R
                  S9[        R                  " [        R                  [        R
                  S9S.nSnU R                  S[        R                  " US9SUS9  g)	zdAdds 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   AddVolumeExportPolicyArgrP   }   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                 .    U R                  S[        SS9  g)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   AddVolumeUnixPermissionsArgrT      s     ?  r   c                 T    [         R                  " U UR                  R                  S9$ )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   GetVolumeSmbSettingsEnumFromArgrW      s'     
		CC
 r   c                 V    U R                  S[        R                  " S[        S9SSS9  g)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:   rS   s    r   AddVolumeSmbSettingsArgr[      s0    !#>;	  
r   c                 h    [         [         S.nSnU R                  S[        R                  " US9US9  g)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   rR   Nfloatr$   r   r%   )r   hourly_snapshot_arg_spechourly_snapshot_helps      r   AddVolumeHourlySnapshotArgrc      sD     ! 	$<=  r   c                 r    [         [         [         S.nSnU R                  S[        R                  " US9US9  g)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   rR   Nr_   )r   daily_snapshot_arg_specdaily_snapshot_helps      r   AddVolumeDailySnapshotArgrh      sG     !
 	$;<  r   c                 |    [         [         [         [        S.nSnU R                  S[        R                  " US9US9  g)z1Adds the --snapshot-weekly arg to the arg parser.r]   r^   re   dayzV
  Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20,
  Sunday 23:50
  z--snapshot-weeklyrF   rR   Nr`   r#   r$   r   r%   )r   weekly_snapshot_arg_specweekly_snapshot_helps      r   AddVolumeWeeklySnapshotArgro      sJ     !	 	$<=  r   c                 |    [         [         [         [        S.nSnU R                  S[        R                  " US9US9  g)z3Addss the --snapshot-monthly arg to the arg parser.rj   zK
  Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50
  z--snapshot-monthlyrF   rR   Nrl   )r   monthly_snapshot_arg_specmonthly_snapshot_helps      r   AddVolumeMonthlySnapshotArgrs     sJ     !	 	$=>   r   c                 \    [         R                  " SSSS9nU R                  S[        SUS9  g)	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"   rI   N)r   DeprecationActionr$   r`   )r   rI   s     r   AddVolumeSnapReserveArgrx   $  s=    $$A5& 	1  r   c                     U R                  S[        R                  " [        R                  [        R
                  S9SSS9  g)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   rJ   rK   rL   rM   rS   s    r   AddVolumeSnapshotDirectoryArgr}   2  sA    !!$++K<N<N   
r   c                 R    [         R                  " XR                  R                  S9$ )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$     
		KK
 r   c                     [         R                  " SUR                  R                  SSSS.SS9nUR                  R                  U 5        g)	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_mappingsr{   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                     U R                  S[        R                  " [        R                  [        R
                  S9SS9  g)z1Adds the --enable-kerberos arg to the arg parser.z--enable-kerberosrA   zBBoolean flag indicating whether Volume is a kerberos Volume or notrR   Nr|   rS   s    r   AddVolumeEnableKerberosArgr   a  s=    !!$++K<N<N T  r   c                     U R                  S[        R                  " [        R                  [        R
                  S9SS9  g)z-Adds the --enable-ladp arg to the arg parser.z--enable-ldaprA   zBBoolean flag indicating whether Volume is a NFS LDAP Volume or notrR   Nr|   rS   s    r   AddVolumeEnableLdapArgr   l  s=    !!$++K<N<N T  r   c                 &    U R                  SSSS9  g)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.)rI   r"   N)r$   rS   s    r   AddVolumeForceArgr   w  s    \  r   c                     [         R                  R                  S[        R                  " SSS9USSS.SS9R                  U 5        g	)
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                     [         R                  R                  S[        R                  " SSS9SSS.SS9R                  U 5        g	)
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   rS   s    r   AddVolumeSourceSnapshotArgr     sE    ++##tN')R8A	 , 
 Kr   c                     [         R                  R                  S[        R                  " SS9SS0SS9R                  U 5        g)	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   rS   s    r   AddVolumeSourceBackupArgr     sC    ++!!U3%r*?	 , 
 Kr   c                 T    [         R                  " U UR                  R                  S9$ )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                 V    U R                  S[        R                  " S[        S9SSS9  g)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'.rZ   Nr:   rS   s    r   AddVolumeRestrictedActionsArgr     s0    !#>!	  r   c                 T    [         R                  " U UR                  R                  S9$ )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                     [         R                  " S[        SS9[        [         R                  " [        R
                  [        R                  S9S.nSnU R                  S[         R                  " US9US	9  g
)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   rR   N)	r   r;   r#   rJ   rK   rL   rM   r$   r%   )r   backup_config_arg_specbackup_config_helps      r   AddVolumeBackupConfigArgr     sw     %,,SC "-"8"8$++K<N<N# 	$:;  r   c                     U R                  S[        R                  " [        R                  [        R
                  S9SS9  g)z0Adds the --large-capacity arg to the arg parser.z--large-capacityrA   zHBoolean flag indicating whether Volume is a large capacity Volume or notrR   Nr|   rS   s    r   AddVolumeLargeCapacityArgr     s=    !!$++K<N<N Z  r   c                     U R                  S[        R                  " [        R                  [        R
                  S9SS9  g)z4Adds the --multiple-endpoints arg to the arg parser.z--multiple-endpointsrA   zLBoolean flag indicating whether Volume is a multiple endpoints Volume or notrR   Nr|   rS   s    r   AddVolumeMultipleEndpointsArgr     s=    !!$++K<N<N ^  r   c                     [         [        R                  " S[         SS9UR                  R                  [
        S.nSnU R                  S[        R                  " US9SUS	9  g
)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   rH   N)r#   r   r;   r   r   intr$   r%   )r   r1   block_device_arg_specblock_devices_helps       r   AddVolumeBlockDevicesArgr      sn      ((SCA%%;;
 	$&  r   c                    U[         R                  R                  :X  d  U[         R                  R                  :X  aN  UR                  R
                  [        [        R                  " [        R                  [        R                  S9S.nOUR                  R
                  [        S.nSnU R                  S[        R                  " US9SUS9  g	)
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|PAUSEDrZ   N)calliope_baseReleaseTrackBETAALPHATieringPolicyTierActionValueValuesEnumr   r   rJ   rK   rL   rM   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                 V   A[         [         [         [         [        R                  " S[         SS9[         [         UR                  R                  UR                  R
                  [        [        R                  " S[         SS9S.nSnU R                  S[        R                  " US9UUS9  g	)
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"   hiddenN)	r#   r   r;   HybridReplicationParameters"ReplicationScheduleValueValuesEnum$HybridReplicationTypeValueValuesEnumr   r$   r%   )r   r1   r   r   &hybrid_replication_parameters_arg_spec"hybrid_replication_parameters_helps         r   'AddVolumeHybridReplicationParametersArgr   B  s     &..SC 

.
.
Q
Q 
.
.
S
S(+##SC#,(,(
$< 	'$JK-	  r   c                 .    U R                  S[        SS9  g)z2Adds the --throughput-mibps arg to the arg parser.z--throughput-mibpsz.The desired throughput of the volume in MiB/s.rR   N)r$   r`   rS   s    r   AddVolumeThroughputMibpsArgr     s    ;  r   c           
      T   [         [         [         [        R                  " S[         SS9[        R                  " [        R
                  [        R                  S9[        R                  " [        R                  " 5       SS9S.nSnU R                  S[        R                  " US	9UUS
9  g)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;   rJ   rK   rL   rM   r%   r$   )r   r   cache_parameters_arg_speccache_parameters_helps       r   AddVolumeCacheParametersArgr     s     &..SC "-!7!7$++K<N<N" "))"**,$ 	$=> 	  r   c                 X    U R                  S[        R                  " S[        S9SUSS9  g)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                 0    U R                  S[        USS9  g)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                    [         R                  " [        R                  " S5      /5      R	                  U 5        [
        R                  " US9n[        R                  " U S5        [        R                  " U S5        [        U 5        [        R                  " U 5        [        U 5        [        U 5        [        U 5        [        U 5        [        U 5        [!        U 5        [#        U 5        [%        U 5        ['        U 5        [)        U 5        [+        U 5        [-        U 5        [/        X5        [1        U 5        [3        U 5        [5        U 5        [7        U 5        U[8        R:                  R<                  [8        R:                  R>                  4;   a  [A        U 5        [C        U 5        [E        U 5        [G        XU5        [I        XU5        [K        U 5        [M        X5        [N        RP                  " U 5        g)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?   rP   rT   r[   r   rc   rh   ro   rs   rx   r}   r   r   r   r   r   r   r   r   GAr   r   r   r   r   r   r   r   AddCreateLabelsFlagsr   r   r1   s      r   AddVolumeCreateArgsr     sp   &&'>?@K..]K(!!&(3vx0#F+V$6"f%&!V$V$F#V$f%&!'F-V$'F#'  %%}'A'A'D'D  V$V$f%Fm<)&MJf%6,""6*r   c                     [         R                  " [        R                  " S5      /5      R	                  U 5        [        R
                  " U 5        [        U 5        g)zAdd args for deleting a Volume.zThe Volume to delete.N)r   r   r
   r   r   r   r   rS   s    r   AddVolumeDeleteArgsr     sB    &&'>?@KV$Fr   c                    [         R                  " [        R                  " S5      /5      R	                  U 5        [
        R                  " US9n[        R                  " U S5        [        R                  " U SSS9  [        U SS9  [        R                  " U 5        [        U SS9  [        U SS9  [        U 5        [        U 5        [        U 5        [!        U 5        [#        U 5        [%        U 5        ['        U 5        [)        U 5        [+        U 5        [-        U 5        [/        X5        [1        U 5        [3        U 5        U[4        R6                  R8                  [4        R6                  R:                  4;   a  [=        U 5        [?        U 5        [A        U 5        [C        XU5        [E        U 5        [G        X5        [H        RJ                  " U 5        g)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?   rP   rT   r[   r   rc   rh   ro   rs   rx   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%&!'F-V$'  %%}'A'A'D'D  V$V$f%Fm<f%6,""6*r   c                     [         R                  R                  S[        R                  " SS9USS0SS9R                  U 5        g)	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
   rK   $googlecloudsdk.command_lib.util.apisr   $googlecloudsdk.command_lib.util.argsr   (googlecloudsdk.command_lib.util.conceptsr   VOLUMES_LIST_FORMATr   r(   r2   r<   r?   rP   rT   rW   r[   rc   rh   ro   rs   rx   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%+P"+Jr   