
    sw                        S r SSK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KJr  SrS:S jrS:S jrS rS:S jrS;S jrS\R8                  S\4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" r*S# r+S:S$ jr,S% r-S& r.S' r/S( r0S) r1S* r2S+ r3S, r4S- r5S. r6S/ r7\Rp                  Rr                  S4S0 jr:S1 r;S;S2 jr<S;S3 jr=S:S4 jr>S;S5 jr?S6 r@S7 rAS8 rBS:S9 jrCg)<z>Flags and helpers for the Cloud NetApp Files Volumes commands.    N)Any)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                     [         [         S.n[        R                  " S5      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textwrapdedentadd_argumentr   ArgDict)r   r   network_arg_specnetwork_helps       r   AddVolumeNetworkArgr(   9   sX     
  " , 	$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   X   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 Volume. Valid component values are:
            `NFSV3`, `NFSV4`, `SMB`, `ISCSI`.)r   r   metavarr    Nr$   r   ArgListr!   r   s     r   AddVolumeProtocolsArgr<   g   s3    !#>1  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?   t   s!    ?	  r   r   r1   c                    [         [         [         [        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UR                  R                  [        S.n[        R                  " S5      nU R                  S[        R                  " US9SUS9  g)	zAdds the Export Policy (--export-policy) arg to the given parser.

Args:
  parser: argparse parser.
  messages: The messages module.
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nfsv4zsquash-modezanon-uida          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,
        squash-mode=SQUASH_MODE,anon-uid=ANON_UID`
  z--export-policyr   appendr   actionr    N)r!   r   
ArgBooleannetapp_utiltruthyfalseySimpleExportPolicyRuleSquashModeValueValuesEnumintr"   r#   r$   r%   )r   r1   export_policy_arg_specexport_policy_helps       r   AddVolumeExportPolicyArgrS   ~   sr    )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 44NN;>   (  	$:;	  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   AddVolumeUnixPermissionsArgrW      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   GetVolumeSmbSettingsEnumFromArgrZ      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:   rV   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   rU   Nfloatr$   r   r%   )r   hourly_snapshot_arg_spechourly_snapshot_helps      r   AddVolumeHourlySnapshotArgrf      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`   ra   hourz;
  Make a snapshot every day e.g. at 06:00, 05:20, 23:50
  z--snapshot-dailyrF   rU   Nrb   )r   daily_snapshot_arg_specdaily_snapshot_helps      r   AddVolumeDailySnapshotArgrk      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`   ra   rh   dayzV
  Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20,
  Sunday 23:50
  z--snapshot-weeklyrF   rU   Nrc   r!   r$   r   r%   )r   weekly_snapshot_arg_specweekly_snapshot_helps      r   AddVolumeWeeklySnapshotArgrr     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.rm   zK
  Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50
  z--snapshot-monthlyrF   rU   Nro   )r   monthly_snapshot_arg_specmonthly_snapshot_helps      r   AddVolumeMonthlySnapshotArgrv     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$   rc   )r   rI   s     r   AddVolumeSnapReserveArgr{   )  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   rV   s    r   AddVolumeSnapshotDirectoryArgr   7  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   F  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   U  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 notrU   Nr   rV   s    r   AddVolumeEnableKerberosArgr   f  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 notrU   Nr   rV   s    r   AddVolumeEnableLdapArgr   q  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$   rV   s    r   AddVolumeForceArgr   |  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   rV   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   rV   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'.r]   Nr:   rV   s    r   AddVolumeRestrictedActionsArgr     s0    !#>!	  r   c                 R    [         R                  " X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&     
		33II
 r   c                    [         R                  " S[        SS9[        [         R                  " [        R
                  [        R                  S9S.n[        R                  " S5      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   rU   Nr   r;   r!   rJ   rK   rL   rM   r"   r#   r$   r%   )r   backup_config_arg_specbackup_config_helps      r   AddVolumeBackupConfigArgr     s     %,,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 notrU   Nr   rV   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 notrU   Nr   rV   s    r   AddVolumeMultipleEndpointsArgr     s=    !!$++K<N<N ^  r   c                     S[         0n[        R                  " S5      nU R                  S[        R
                  " US9S0 US9  g)z7Adds the --large-capacity-config arg to the arg parser.zconstituent-countaM        Large Capacity Config contains configuration for large capacity volumes.

      Large Capacity Config has the following format:
      `--large-capacity-config=constituent-count=CONSTITUENT_COUNT`
      `--large-capacity-config`

      *constituent-count*::: (optional) The number of constituents for a large capacity volume.
  z--large-capacity-configrF   ?)r   nargsconstr    N)rP   r"   r#   r$   r   r%   )r   large_capacity_config_arg_speclarge_capacity_config_helps      r   AddVolumeLargeCapacityConfigArgr     sW     3$   ( 0   	$BC%  r   c                     [         [        R                  " S[         SS9UR                  R                  [
        S.n[        R                  " S5      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   rP   r"   r#   r$   r%   )r   r1   block_device_arg_specblock_devices_helps       r   AddVolumeBlockDevicesArgr     s{      ((SC %%;;   
( 
 	$9:	  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[        R                  " S5      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|PAUSEDr]   N)calliope_baseReleaseTrackBETAALPHATieringPolicyTierActionValueValuesEnumrP   r   rJ   rK   rL   rM   r"   r#   r$   r%   )r   r1   release_tracktiering_policy_arg_spectiering_policy_helps        r   AddVolumeTieringPolicyArgr   8  s     }11666	-44::	:  --GG"%'2'='=&--&--(
  --GG"% ! )  	$;<*	  r   c                 ~   A[         [         [         [         [        R                  " S[         SS9[         [         UR                  R                  UR                  R
                  [        [        R                  " S[         SS9S.n[        R                  " S5      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$HybridReplicationTypeValueValuesEnumrP   r"   r#   r$   r%   )r   r1   r   r   &hybrid_replication_parameters_arg_spec"hybrid_replication_parameters_helps         r   'AddVolumeHybridReplicationParametersArgr   _  s     &..SC 

.
.
Q
Q 
.
.
S
S(+##SC#,(, (0 8
 ($< 	'$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.rU   N)r$   rc   rV   s    r   AddVolumeThroughputMibpsArgr     s    ;  r   c           
      |   [         [         [         [        R                  " S[         SS9[        R                  " [        R
                  [        R                  S9[        R                  " [        R                  " 5       SS9S.n[        R                  " S5      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$   )r   r   cache_parameters_arg_speccache_parameters_helps       r   AddVolumeCacheParametersArgr     s     &..SC "-!7!7$++K<N<N" "))"**, #// + $ 	$=> 	  r   c                 B   [         R                  " S[        SS9[         R                  " S[        SS9[         R                  " [        R
                  [        R                  S9S.n[        R                  " S5      nU R                  S[         R                  " US9UUS	9  g
)z4Adds the --cache-pre-populate arg to the arg parser.r4   r   r   rA   )z	path-listzexclude-path-list	recursiona        Cache Pre-populate contains cache pre-populate parameters of a volume.

      Cache Pre-populate will have the following format
      `--cache-pre-populate=path-list=PATH_LIST1#PATH_LIST2,
        exclude-path-list=EXCLUDE_PATH_LIST1#EXCLUDE_PATH_LIST2,
        recursion=RECURSION`

      *path-list*::: Hashtag-separated(#) list of paths to be pre-populated
      *exclude-path-list*::: Hashtag-separated(#) list of paths to be excluded from pre-population
      *recursion*::: Boolean value indicating pre-populate recursion.
  z--cache-pre-populaterF   r   Nr   )r   r   cache_pre_populate_arg_speccache_pre_populate_helps       r   AddVolumeCachePrePopulateArgr     s     &&SC '..SC ))$++K<N<N
! %OO -  	$?@"	  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        [        X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        U 5        [O        X5        [P        RR                  " U 5        U[8        R:                  RT                  [8        R:                  R<                  4;   a  [W        U 5        g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?   rS   rW   r^   r   rf   rk   rr   rv   r{   r   r   r   r   r   r   r   r   r   GAr   r   r   r   r   r   r   r   r
   AddCreateLabelsFlagsr   r   r   r   r1   s      r   AddVolumeCreateArgsr    s   &&'>?@K..]K(!!&(3vx0#F+V$6,f%&!V$V$F#V$f%&!'F-V$'F#'  %%  ##  V$V$f%Fm<)&MJf%v&6,""6*  &&  %%  $F+	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   rV   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  [        X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        U 5        [I        X5        [J        RL                  " 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?   rS   rW   r^   r   rf   rk   rr   rv   r{   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   AddUpdateLabelsFlagsr  s      r   AddVolumeUpdateArgsr  D  sg   &&'>?@K..]K(!!&(3vx%@#FU;V$//6,f%&!V$V$F#V$f%&!'F-V$'  %%  ##  V$V$f%Fm<f%v&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
  k  sF    ++!!U3%r*O ,  Kr   )T)F)D__doc__argparser"   typingr   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?   ArgumentParserrS   rW   rZ   r^   rf   rk   rr   rv   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  r
   r   r   <module>r     s9   E    A + / 9 3 A : < D		 >
9X%<%< 9 9x  "&$4" 	 <.:$P %2$>$>$A$A%>B'TB,,^$+Nr   