diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/ActiveDirectory.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/ActiveDirectory.php new file mode 100644 index 000000000000..bdc4c8460eec Binary files /dev/null and b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/ActiveDirectory.php differ diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Backup.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Backup.php new file mode 100644 index 000000000000..81a4296e6ef2 Binary files /dev/null and b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Backup.php differ diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupPolicy.php new file mode 100644 index 000000000000..0e9be38639b1 Binary files /dev/null and b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupPolicy.php differ diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupVault.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupVault.php new file mode 100644 index 000000000000..283d37baeecc Binary files /dev/null and b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupVault.php differ diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/CloudNetappService.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/CloudNetappService.php new file mode 100644 index 000000000000..4d1391f97236 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/CloudNetappService.php @@ -0,0 +1,144 @@ +internalAddGeneratedFile( + ' +b +1google/cloud/netapp/v1/cloud_netapp_service.protogoogle.cloud.netapp.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/netapp/v1/active_directory.proto#google/cloud/netapp/v1/backup.proto*google/cloud/netapp/v1/backup_policy.proto)google/cloud/netapp/v1/backup_vault.proto google/cloud/netapp/v1/kms.proto(google/cloud/netapp/v1/replication.proto%google/cloud/netapp/v1/snapshot.proto)google/cloud/netapp/v1/storage_pool.proto#google/cloud/netapp/v1/volume.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto" +OperationMetadata4 + create_time ( 2.google.protobuf.TimestampBA1 +end_time ( 2.google.protobuf.TimestampBA +target ( BA +verb ( BA +status_message ( BA# +requested_cancellation (BA + api_version ( BA2Y +NetApp +ListStoragePools/.google.cloud.netapp.v1.ListStoragePoolsRequest0.google.cloud.netapp.v1.ListStoragePoolsResponse"AAparent20/v1/{parent=projects/*/locations/*}/storagePools +CreateStoragePool0.google.cloud.netapp.v1.CreateStoragePoolRequest.google.longrunning.Operation"A + StoragePoolOperationMetadataA#parent,storage_pool,storage_pool_id@"0/v1/{parent=projects/*/locations/*}/storagePools: storage_pool +GetStoragePool-.google.cloud.netapp.v1.GetStoragePoolRequest#.google.cloud.netapp.v1.StoragePool"?Aname20/v1/{name=projects/*/locations/*/storagePools/*} +UpdateStoragePool0.google.cloud.netapp.v1.UpdateStoragePoolRequest.google.longrunning.Operation"A + StoragePoolOperationMetadataAstorage_pool,update_maskM2=/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}: storage_pool +DeleteStoragePool0.google.cloud.netapp.v1.DeleteStoragePoolRequest.google.longrunning.Operation"lA* +google.protobuf.EmptyOperationMetadataAname2*0/v1/{name=projects/*/locations/*/storagePools/*} +SwitchActiveReplicaZone6.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.google.longrunning.Operation"eA + StoragePoolOperationMetadata<"7/v1/{name=projects/*/locations/*/storagePools/*}:switch:* + ListVolumes*.google.cloud.netapp.v1.ListVolumesRequest+.google.cloud.netapp.v1.ListVolumesResponse"google.cloud.netapp.v1.AccessType + */ +class AccessType +{ + /** + * Unspecified Access Type + * + * Generated from protobuf enum ACCESS_TYPE_UNSPECIFIED = 0; + */ + const ACCESS_TYPE_UNSPECIFIED = 0; + /** + * Read Only + * + * Generated from protobuf enum READ_ONLY = 1; + */ + const READ_ONLY = 1; + /** + * Read Write + * + * Generated from protobuf enum READ_WRITE = 2; + */ + const READ_WRITE = 2; + /** + * None + * + * Generated from protobuf enum READ_NONE = 3; + */ + const READ_NONE = 3; + + private static $valueToName = [ + self::ACCESS_TYPE_UNSPECIFIED => 'ACCESS_TYPE_UNSPECIFIED', + self::READ_ONLY => 'READ_ONLY', + self::READ_WRITE => 'READ_WRITE', + self::READ_NONE => 'READ_NONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php new file mode 100644 index 000000000000..9176e1055524 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php @@ -0,0 +1,827 @@ +google.cloud.netapp.v1.ActiveDirectory + */ +class ActiveDirectory extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the active directory. + * Format: + * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Create time of the active directory. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The state of the AD. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. Name of the Active Directory domain + * + * Generated from protobuf field string domain = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $domain = ''; + /** + * The Active Directory site the service will limit Domain Controller + * discovery too. + * + * Generated from protobuf field string site = 5; + */ + protected $site = ''; + /** + * Required. Comma separated list of DNS server IP addresses for the Active + * Directory domain. + * + * Generated from protobuf field string dns = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dns = ''; + /** + * Required. NetBIOSPrefix is used as a prefix for SMB server name. + * + * Generated from protobuf field string net_bios_prefix = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $net_bios_prefix = ''; + /** + * The Organizational Unit (OU) within the Windows Active Directory the user + * belongs to. + * + * Generated from protobuf field string organizational_unit = 8; + */ + protected $organizational_unit = ''; + /** + * If enabled, AES encryption will be enabled for SMB communication. + * + * Generated from protobuf field bool aes_encryption = 9; + */ + protected $aes_encryption = false; + /** + * Required. Username of the Active Directory domain administrator. + * + * Generated from protobuf field string username = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + /** + * Required. Password of the Active Directory domain administrator. + * + * Generated from protobuf field string password = 11 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $password = ''; + /** + * Optional. Users to be added to the Built-in Backup Operator active + * directory group. + * + * Generated from protobuf field repeated string backup_operators = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $backup_operators; + /** + * Optional. Users to be added to the Built-in Admininstrators group. + * + * Generated from protobuf field repeated string administrators = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $administrators; + /** + * Optional. Domain users to be given the SeSecurityPrivilege. + * + * Generated from protobuf field repeated string security_operators = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $security_operators; + /** + * Name of the active directory machine. This optional parameter is used only + * while creating kerberos volume + * + * Generated from protobuf field string kdc_hostname = 14; + */ + protected $kdc_hostname = ''; + /** + * KDC server IP address for the active directory machine. + * + * Generated from protobuf field string kdc_ip = 15; + */ + protected $kdc_ip = ''; + /** + * If enabled, will allow access to local users and LDAP users. If access is + * needed for only LDAP users, it has to be disabled. + * + * Generated from protobuf field bool nfs_users_with_ldap = 16; + */ + protected $nfs_users_with_ldap = false; + /** + * Description of the active directory. + * + * Generated from protobuf field string description = 17; + */ + protected $description = ''; + /** + * Specifies whether or not the LDAP traffic needs to be signed. + * + * Generated from protobuf field bool ldap_signing = 18; + */ + protected $ldap_signing = false; + /** + * If enabled, traffic between the SMB server to Domain Controller (DC) will + * be encrypted. + * + * Generated from protobuf field bool encrypt_dc_connections = 19; + */ + protected $encrypt_dc_connections = false; + /** + * Labels for the active directory. + * + * Generated from protobuf field map labels = 20; + */ + private $labels; + /** + * Output only. The state details of the Active Directory. + * + * Generated from protobuf field string state_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the active directory. + * Format: + * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the active directory. + * @type int $state + * Output only. The state of the AD. + * @type string $domain + * Required. Name of the Active Directory domain + * @type string $site + * The Active Directory site the service will limit Domain Controller + * discovery too. + * @type string $dns + * Required. Comma separated list of DNS server IP addresses for the Active + * Directory domain. + * @type string $net_bios_prefix + * Required. NetBIOSPrefix is used as a prefix for SMB server name. + * @type string $organizational_unit + * The Organizational Unit (OU) within the Windows Active Directory the user + * belongs to. + * @type bool $aes_encryption + * If enabled, AES encryption will be enabled for SMB communication. + * @type string $username + * Required. Username of the Active Directory domain administrator. + * @type string $password + * Required. Password of the Active Directory domain administrator. + * @type array|\Google\Protobuf\Internal\RepeatedField $backup_operators + * Optional. Users to be added to the Built-in Backup Operator active + * directory group. + * @type array|\Google\Protobuf\Internal\RepeatedField $administrators + * Optional. Users to be added to the Built-in Admininstrators group. + * @type array|\Google\Protobuf\Internal\RepeatedField $security_operators + * Optional. Domain users to be given the SeSecurityPrivilege. + * @type string $kdc_hostname + * Name of the active directory machine. This optional parameter is used only + * while creating kerberos volume + * @type string $kdc_ip + * KDC server IP address for the active directory machine. + * @type bool $nfs_users_with_ldap + * If enabled, will allow access to local users and LDAP users. If access is + * needed for only LDAP users, it has to be disabled. + * @type string $description + * Description of the active directory. + * @type bool $ldap_signing + * Specifies whether or not the LDAP traffic needs to be signed. + * @type bool $encrypt_dc_connections + * If enabled, traffic between the SMB server to Domain Controller (DC) will + * be encrypted. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels for the active directory. + * @type string $state_details + * Output only. The state details of the Active Directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the active directory. + * Format: + * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the active directory. + * Format: + * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Create time of the active directory. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the active directory. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The state of the AD. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the AD. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\ActiveDirectory\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Name of the Active Directory domain + * + * Generated from protobuf field string domain = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Required. Name of the Active Directory domain + * + * Generated from protobuf field string domain = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + + /** + * The Active Directory site the service will limit Domain Controller + * discovery too. + * + * Generated from protobuf field string site = 5; + * @return string + */ + public function getSite() + { + return $this->site; + } + + /** + * The Active Directory site the service will limit Domain Controller + * discovery too. + * + * Generated from protobuf field string site = 5; + * @param string $var + * @return $this + */ + public function setSite($var) + { + GPBUtil::checkString($var, True); + $this->site = $var; + + return $this; + } + + /** + * Required. Comma separated list of DNS server IP addresses for the Active + * Directory domain. + * + * Generated from protobuf field string dns = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDns() + { + return $this->dns; + } + + /** + * Required. Comma separated list of DNS server IP addresses for the Active + * Directory domain. + * + * Generated from protobuf field string dns = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDns($var) + { + GPBUtil::checkString($var, True); + $this->dns = $var; + + return $this; + } + + /** + * Required. NetBIOSPrefix is used as a prefix for SMB server name. + * + * Generated from protobuf field string net_bios_prefix = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetBiosPrefix() + { + return $this->net_bios_prefix; + } + + /** + * Required. NetBIOSPrefix is used as a prefix for SMB server name. + * + * Generated from protobuf field string net_bios_prefix = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetBiosPrefix($var) + { + GPBUtil::checkString($var, True); + $this->net_bios_prefix = $var; + + return $this; + } + + /** + * The Organizational Unit (OU) within the Windows Active Directory the user + * belongs to. + * + * Generated from protobuf field string organizational_unit = 8; + * @return string + */ + public function getOrganizationalUnit() + { + return $this->organizational_unit; + } + + /** + * The Organizational Unit (OU) within the Windows Active Directory the user + * belongs to. + * + * Generated from protobuf field string organizational_unit = 8; + * @param string $var + * @return $this + */ + public function setOrganizationalUnit($var) + { + GPBUtil::checkString($var, True); + $this->organizational_unit = $var; + + return $this; + } + + /** + * If enabled, AES encryption will be enabled for SMB communication. + * + * Generated from protobuf field bool aes_encryption = 9; + * @return bool + */ + public function getAesEncryption() + { + return $this->aes_encryption; + } + + /** + * If enabled, AES encryption will be enabled for SMB communication. + * + * Generated from protobuf field bool aes_encryption = 9; + * @param bool $var + * @return $this + */ + public function setAesEncryption($var) + { + GPBUtil::checkBool($var); + $this->aes_encryption = $var; + + return $this; + } + + /** + * Required. Username of the Active Directory domain administrator. + * + * Generated from protobuf field string username = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. Username of the Active Directory domain administrator. + * + * Generated from protobuf field string username = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Required. Password of the Active Directory domain administrator. + * + * Generated from protobuf field string password = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Required. Password of the Active Directory domain administrator. + * + * Generated from protobuf field string password = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Optional. Users to be added to the Built-in Backup Operator active + * directory group. + * + * Generated from protobuf field repeated string backup_operators = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackupOperators() + { + return $this->backup_operators; + } + + /** + * Optional. Users to be added to the Built-in Backup Operator active + * directory group. + * + * Generated from protobuf field repeated string backup_operators = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackupOperators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->backup_operators = $arr; + + return $this; + } + + /** + * Optional. Users to be added to the Built-in Admininstrators group. + * + * Generated from protobuf field repeated string administrators = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdministrators() + { + return $this->administrators; + } + + /** + * Optional. Users to be added to the Built-in Admininstrators group. + * + * Generated from protobuf field repeated string administrators = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdministrators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->administrators = $arr; + + return $this; + } + + /** + * Optional. Domain users to be given the SeSecurityPrivilege. + * + * Generated from protobuf field repeated string security_operators = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecurityOperators() + { + return $this->security_operators; + } + + /** + * Optional. Domain users to be given the SeSecurityPrivilege. + * + * Generated from protobuf field repeated string security_operators = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecurityOperators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->security_operators = $arr; + + return $this; + } + + /** + * Name of the active directory machine. This optional parameter is used only + * while creating kerberos volume + * + * Generated from protobuf field string kdc_hostname = 14; + * @return string + */ + public function getKdcHostname() + { + return $this->kdc_hostname; + } + + /** + * Name of the active directory machine. This optional parameter is used only + * while creating kerberos volume + * + * Generated from protobuf field string kdc_hostname = 14; + * @param string $var + * @return $this + */ + public function setKdcHostname($var) + { + GPBUtil::checkString($var, True); + $this->kdc_hostname = $var; + + return $this; + } + + /** + * KDC server IP address for the active directory machine. + * + * Generated from protobuf field string kdc_ip = 15; + * @return string + */ + public function getKdcIp() + { + return $this->kdc_ip; + } + + /** + * KDC server IP address for the active directory machine. + * + * Generated from protobuf field string kdc_ip = 15; + * @param string $var + * @return $this + */ + public function setKdcIp($var) + { + GPBUtil::checkString($var, True); + $this->kdc_ip = $var; + + return $this; + } + + /** + * If enabled, will allow access to local users and LDAP users. If access is + * needed for only LDAP users, it has to be disabled. + * + * Generated from protobuf field bool nfs_users_with_ldap = 16; + * @return bool + */ + public function getNfsUsersWithLdap() + { + return $this->nfs_users_with_ldap; + } + + /** + * If enabled, will allow access to local users and LDAP users. If access is + * needed for only LDAP users, it has to be disabled. + * + * Generated from protobuf field bool nfs_users_with_ldap = 16; + * @param bool $var + * @return $this + */ + public function setNfsUsersWithLdap($var) + { + GPBUtil::checkBool($var); + $this->nfs_users_with_ldap = $var; + + return $this; + } + + /** + * Description of the active directory. + * + * Generated from protobuf field string description = 17; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the active directory. + * + * Generated from protobuf field string description = 17; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Specifies whether or not the LDAP traffic needs to be signed. + * + * Generated from protobuf field bool ldap_signing = 18; + * @return bool + */ + public function getLdapSigning() + { + return $this->ldap_signing; + } + + /** + * Specifies whether or not the LDAP traffic needs to be signed. + * + * Generated from protobuf field bool ldap_signing = 18; + * @param bool $var + * @return $this + */ + public function setLdapSigning($var) + { + GPBUtil::checkBool($var); + $this->ldap_signing = $var; + + return $this; + } + + /** + * If enabled, traffic between the SMB server to Domain Controller (DC) will + * be encrypted. + * + * Generated from protobuf field bool encrypt_dc_connections = 19; + * @return bool + */ + public function getEncryptDcConnections() + { + return $this->encrypt_dc_connections; + } + + /** + * If enabled, traffic between the SMB server to Domain Controller (DC) will + * be encrypted. + * + * Generated from protobuf field bool encrypt_dc_connections = 19; + * @param bool $var + * @return $this + */ + public function setEncryptDcConnections($var) + { + GPBUtil::checkBool($var); + $this->encrypt_dc_connections = $var; + + return $this; + } + + /** + * Labels for the active directory. + * + * Generated from protobuf field map labels = 20; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels for the active directory. + * + * Generated from protobuf field map labels = 20; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The state details of the Active Directory. + * + * Generated from protobuf field string state_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. The state details of the Active Directory. + * + * Generated from protobuf field string state_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php new file mode 100644 index 000000000000..3a389d8644a2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php @@ -0,0 +1,99 @@ +google.cloud.netapp.v1.ActiveDirectory.State + */ +class State +{ + /** + * Unspecified Active Directory State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Active Directory State is Creating + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Active Directory State is Ready + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Active Directory State is Updating + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Active Directory State is In use + * + * Generated from protobuf enum IN_USE = 4; + */ + const IN_USE = 4; + /** + * Active Directory State is Deleting + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + /** + * Active Directory State is Error + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + /** + * Active Directory State is Diagnosing. + * + * Generated from protobuf enum DIAGNOSING = 7; + */ + const DIAGNOSING = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::UPDATING => 'UPDATING', + self::IN_USE => 'IN_USE', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::DIAGNOSING => 'DIAGNOSING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\ActiveDirectory_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php new file mode 100644 index 000000000000..44d1e746525a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php @@ -0,0 +1,441 @@ +google.cloud.netapp.v1.Backup + */ +class Backup extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the backup. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The backup state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Output only. Size of the file system when the backup was created. When + * creating a new volume from the backup, the volume capacity will have to be + * at least as big. + * + * Generated from protobuf field int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_usage_bytes = 0; + /** + * Output only. Type of backup, manually created or created by a backup + * policy. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $backup_type = 0; + /** + * Volume full name of this backup belongs to. + * Format: + * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string source_volume = 6 [(.google.api.resource_reference) = { + */ + protected $source_volume = ''; + /** + * If specified, backup will be created from the given snapshot. + * If not specified, there will be a new snapshot taken to initiate the backup + * creation. Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field optional string source_snapshot = 7 [(.google.api.resource_reference) = { + */ + protected $source_snapshot = null; + /** + * Output only. The time when the backup was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size) + * + * Generated from protobuf field int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $chain_storage_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the backup. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. + * @type int $state + * Output only. The backup state. + * @type string $description + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * @type int|string $volume_usage_bytes + * Output only. Size of the file system when the backup was created. When + * creating a new volume from the backup, the volume capacity will have to be + * at least as big. + * @type int $backup_type + * Output only. Type of backup, manually created or created by a backup + * policy. + * @type string $source_volume + * Volume full name of this backup belongs to. + * Format: + * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + * @type string $source_snapshot + * If specified, backup will be created from the given snapshot. + * If not specified, there will be a new snapshot taken to initiate the backup + * creation. Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the backup was created. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * @type int|string $chain_storage_bytes + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the backup. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the backup. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The backup state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The backup state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Backup\State::class); + $this->state = $var; + + return $this; + } + + /** + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Size of the file system when the backup was created. When + * creating a new volume from the backup, the volume capacity will have to be + * at least as big. + * + * Generated from protobuf field int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getVolumeUsageBytes() + { + return $this->volume_usage_bytes; + } + + /** + * Output only. Size of the file system when the backup was created. When + * creating a new volume from the backup, the volume capacity will have to be + * at least as big. + * + * Generated from protobuf field int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setVolumeUsageBytes($var) + { + GPBUtil::checkInt64($var); + $this->volume_usage_bytes = $var; + + return $this; + } + + /** + * Output only. Type of backup, manually created or created by a backup + * policy. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getBackupType() + { + return $this->backup_type; + } + + /** + * Output only. Type of backup, manually created or created by a backup + * policy. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setBackupType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Backup\Type::class); + $this->backup_type = $var; + + return $this; + } + + /** + * Volume full name of this backup belongs to. + * Format: + * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string source_volume = 6 [(.google.api.resource_reference) = { + * @return string + */ + public function getSourceVolume() + { + return $this->source_volume; + } + + /** + * Volume full name of this backup belongs to. + * Format: + * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string source_volume = 6 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceVolume($var) + { + GPBUtil::checkString($var, True); + $this->source_volume = $var; + + return $this; + } + + /** + * If specified, backup will be created from the given snapshot. + * If not specified, there will be a new snapshot taken to initiate the backup + * creation. Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field optional string source_snapshot = 7 [(.google.api.resource_reference) = { + * @return string + */ + public function getSourceSnapshot() + { + return isset($this->source_snapshot) ? $this->source_snapshot : ''; + } + + public function hasSourceSnapshot() + { + return isset($this->source_snapshot); + } + + public function clearSourceSnapshot() + { + unset($this->source_snapshot); + } + + /** + * If specified, backup will be created from the given snapshot. + * If not specified, there will be a new snapshot taken to initiate the backup + * creation. Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field optional string source_snapshot = 7 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->source_snapshot = $var; + + return $this; + } + + /** + * Output only. The time when the backup was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the backup was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size) + * + * Generated from protobuf field int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getChainStorageBytes() + { + return $this->chain_storage_bytes; + } + + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size) + * + * Generated from protobuf field int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setChainStorageBytes($var) + { + GPBUtil::checkInt64($var); + $this->chain_storage_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php new file mode 100644 index 000000000000..f70f0dc677d5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php @@ -0,0 +1,96 @@ +google.cloud.netapp.v1.Backup.State + */ +class State +{ + /** + * State not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Backup is being created. While in this state, the snapshot for the backup + * point-in-time may not have been created yet, and so the point-in-time may + * not have been fixed. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Backup is being uploaded. While in this state, none of the writes to the + * volume will be included in the backup. + * + * Generated from protobuf enum UPLOADING = 2; + */ + const UPLOADING = 2; + /** + * Backup is available for use. + * + * Generated from protobuf enum READY = 3; + */ + const READY = 3; + /** + * Backup is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * Backup is not valid and cannot be used for creating new volumes or + * restoring existing volumes. + * + * Generated from protobuf enum ERROR = 5; + */ + const ERROR = 5; + /** + * Backup is being updated. + * + * Generated from protobuf enum UPDATING = 6; + */ + const UPDATING = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::UPLOADING => 'UPLOADING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\Backup_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php new file mode 100644 index 000000000000..0ab607ae7d6d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php @@ -0,0 +1,64 @@ +google.cloud.netapp.v1.Backup.Type + */ +class Type +{ + /** + * Unspecified backup type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Manual backup type. + * + * Generated from protobuf enum MANUAL = 1; + */ + const MANUAL = 1; + /** + * Scheduled backup type. + * + * Generated from protobuf enum SCHEDULED = 2; + */ + const SCHEDULED = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::MANUAL => 'MANUAL', + self::SCHEDULED => 'SCHEDULED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\NetApp\V1\Backup_Type::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php new file mode 100644 index 000000000000..93f0b682ab39 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php @@ -0,0 +1,209 @@ +google.cloud.netapp.v1.BackupConfig + */ +class BackupConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. When specified, schedule backups will be created based on the + * policy configuration. + * + * Generated from protobuf field repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $backup_policies; + /** + * Optional. Name of backup vault. + * Format: + * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + * + * Generated from protobuf field string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $backup_vault = ''; + /** + * Optional. When set to true, scheduled backup is enabled on the volume. + * This field should be nil when there's no backup policy attached. + * + * Generated from protobuf field optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scheduled_backup_enabled = null; + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size). + * + * Generated from protobuf field optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $backup_chain_bytes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $backup_policies + * Optional. When specified, schedule backups will be created based on the + * policy configuration. + * @type string $backup_vault + * Optional. Name of backup vault. + * Format: + * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + * @type bool $scheduled_backup_enabled + * Optional. When set to true, scheduled backup is enabled on the volume. + * This field should be nil when there's no backup policy attached. + * @type int|string $backup_chain_bytes + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Optional. When specified, schedule backups will be created based on the + * policy configuration. + * + * Generated from protobuf field repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackupPolicies() + { + return $this->backup_policies; + } + + /** + * Optional. When specified, schedule backups will be created based on the + * policy configuration. + * + * Generated from protobuf field repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackupPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->backup_policies = $arr; + + return $this; + } + + /** + * Optional. Name of backup vault. + * Format: + * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + * + * Generated from protobuf field string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getBackupVault() + { + return $this->backup_vault; + } + + /** + * Optional. Name of backup vault. + * Format: + * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + * + * Generated from protobuf field string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackupVault($var) + { + GPBUtil::checkString($var, True); + $this->backup_vault = $var; + + return $this; + } + + /** + * Optional. When set to true, scheduled backup is enabled on the volume. + * This field should be nil when there's no backup policy attached. + * + * Generated from protobuf field optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getScheduledBackupEnabled() + { + return isset($this->scheduled_backup_enabled) ? $this->scheduled_backup_enabled : false; + } + + public function hasScheduledBackupEnabled() + { + return isset($this->scheduled_backup_enabled); + } + + public function clearScheduledBackupEnabled() + { + unset($this->scheduled_backup_enabled); + } + + /** + * Optional. When set to true, scheduled backup is enabled on the volume. + * This field should be nil when there's no backup policy attached. + * + * Generated from protobuf field optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setScheduledBackupEnabled($var) + { + GPBUtil::checkBool($var); + $this->scheduled_backup_enabled = $var; + + return $this; + } + + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size). + * + * Generated from protobuf field optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getBackupChainBytes() + { + return isset($this->backup_chain_bytes) ? $this->backup_chain_bytes : 0; + } + + public function hasBackupChainBytes() + { + return isset($this->backup_chain_bytes); + } + + public function clearBackupChainBytes() + { + unset($this->backup_chain_bytes); + } + + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size). + * + * Generated from protobuf field optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setBackupChainBytes($var) + { + GPBUtil::checkInt64($var); + $this->backup_chain_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php new file mode 100644 index 000000000000..4da6f34e30a1 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php @@ -0,0 +1,471 @@ +google.cloud.netapp.v1.BackupPolicy + */ +class BackupPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the backup policy. + * Format: + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Number of daily backups to keep. Note that the minimum daily backup limit + * is 2. + * + * Generated from protobuf field optional int32 daily_backup_limit = 2; + */ + protected $daily_backup_limit = null; + /** + * Number of weekly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 weekly_backup_limit = 3; + */ + protected $weekly_backup_limit = null; + /** + * Number of monthly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 monthly_backup_limit = 4; + */ + protected $monthly_backup_limit = null; + /** + * Description of the backup policy. + * + * Generated from protobuf field optional string description = 5; + */ + protected $description = null; + /** + * If enabled, make backups automatically according to the schedules. + * This will be applied to all volumes that have this policy attached and + * enforced on volume level. If not specified, default is true. + * + * Generated from protobuf field optional bool enabled = 6; + */ + protected $enabled = null; + /** + * Output only. The total number of volumes assigned by this backup policy. + * + * Generated from protobuf field optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $assigned_volume_count = null; + /** + * Output only. The time when the backup policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + /** + * Output only. The backup policy state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the backup policy. + * Format: + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. + * @type int $daily_backup_limit + * Number of daily backups to keep. Note that the minimum daily backup limit + * is 2. + * @type int $weekly_backup_limit + * Number of weekly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * @type int $monthly_backup_limit + * Number of monthly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * @type string $description + * Description of the backup policy. + * @type bool $enabled + * If enabled, make backups automatically according to the schedules. + * This will be applied to all volumes that have this policy attached and + * enforced on volume level. If not specified, default is true. + * @type int $assigned_volume_count + * Output only. The total number of volumes assigned by this backup policy. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the backup policy was created. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * @type int $state + * Output only. The backup policy state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the backup policy. + * Format: + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the backup policy. + * Format: + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Number of daily backups to keep. Note that the minimum daily backup limit + * is 2. + * + * Generated from protobuf field optional int32 daily_backup_limit = 2; + * @return int + */ + public function getDailyBackupLimit() + { + return isset($this->daily_backup_limit) ? $this->daily_backup_limit : 0; + } + + public function hasDailyBackupLimit() + { + return isset($this->daily_backup_limit); + } + + public function clearDailyBackupLimit() + { + unset($this->daily_backup_limit); + } + + /** + * Number of daily backups to keep. Note that the minimum daily backup limit + * is 2. + * + * Generated from protobuf field optional int32 daily_backup_limit = 2; + * @param int $var + * @return $this + */ + public function setDailyBackupLimit($var) + { + GPBUtil::checkInt32($var); + $this->daily_backup_limit = $var; + + return $this; + } + + /** + * Number of weekly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 weekly_backup_limit = 3; + * @return int + */ + public function getWeeklyBackupLimit() + { + return isset($this->weekly_backup_limit) ? $this->weekly_backup_limit : 0; + } + + public function hasWeeklyBackupLimit() + { + return isset($this->weekly_backup_limit); + } + + public function clearWeeklyBackupLimit() + { + unset($this->weekly_backup_limit); + } + + /** + * Number of weekly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 weekly_backup_limit = 3; + * @param int $var + * @return $this + */ + public function setWeeklyBackupLimit($var) + { + GPBUtil::checkInt32($var); + $this->weekly_backup_limit = $var; + + return $this; + } + + /** + * Number of monthly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 monthly_backup_limit = 4; + * @return int + */ + public function getMonthlyBackupLimit() + { + return isset($this->monthly_backup_limit) ? $this->monthly_backup_limit : 0; + } + + public function hasMonthlyBackupLimit() + { + return isset($this->monthly_backup_limit); + } + + public function clearMonthlyBackupLimit() + { + unset($this->monthly_backup_limit); + } + + /** + * Number of monthly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 monthly_backup_limit = 4; + * @param int $var + * @return $this + */ + public function setMonthlyBackupLimit($var) + { + GPBUtil::checkInt32($var); + $this->monthly_backup_limit = $var; + + return $this; + } + + /** + * Description of the backup policy. + * + * Generated from protobuf field optional string description = 5; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * Description of the backup policy. + * + * Generated from protobuf field optional string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * If enabled, make backups automatically according to the schedules. + * This will be applied to all volumes that have this policy attached and + * enforced on volume level. If not specified, default is true. + * + * Generated from protobuf field optional bool enabled = 6; + * @return bool + */ + public function getEnabled() + { + return isset($this->enabled) ? $this->enabled : false; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * If enabled, make backups automatically according to the schedules. + * This will be applied to all volumes that have this policy attached and + * enforced on volume level. If not specified, default is true. + * + * Generated from protobuf field optional bool enabled = 6; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Output only. The total number of volumes assigned by this backup policy. + * + * Generated from protobuf field optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAssignedVolumeCount() + { + return isset($this->assigned_volume_count) ? $this->assigned_volume_count : 0; + } + + public function hasAssignedVolumeCount() + { + return isset($this->assigned_volume_count); + } + + public function clearAssignedVolumeCount() + { + unset($this->assigned_volume_count); + } + + /** + * Output only. The total number of volumes assigned by this backup policy. + * + * Generated from protobuf field optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAssignedVolumeCount($var) + { + GPBUtil::checkInt32($var); + $this->assigned_volume_count = $var; + + return $this; + } + + /** + * Output only. The time when the backup policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the backup policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The backup policy state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The backup policy state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\BackupPolicy\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php new file mode 100644 index 000000000000..db7d55ef4764 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php @@ -0,0 +1,83 @@ +google.cloud.netapp.v1.BackupPolicy.State + */ +class State +{ + /** + * State not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * BackupPolicy is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * BackupPolicy is available for use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * BackupPolicy is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * BackupPolicy is not valid and cannot be used. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + /** + * BackupPolicy is being updated. + * + * Generated from protobuf enum UPDATING = 5; + */ + const UPDATING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\BackupPolicy_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php new file mode 100644 index 000000000000..c75d20e047a6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php @@ -0,0 +1,221 @@ +google.cloud.netapp.v1.BackupVault + */ +class BackupVault extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the backup vault. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The backup vault state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Create time of the backup vault. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Description of the backup vault. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the backup vault. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * @type int $state + * Output only. The backup vault state. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the backup vault. + * @type string $description + * Description of the backup vault. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the backup vault. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the backup vault. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The backup vault state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The backup vault state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\BackupVault\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Create time of the backup vault. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the backup vault. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Description of the backup vault. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the backup vault. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php new file mode 100644 index 000000000000..8fdad3c342b9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php @@ -0,0 +1,85 @@ +google.cloud.netapp.v1.BackupVault.State + */ +class State +{ + /** + * State not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * BackupVault is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * BackupVault is available for use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * BackupVault is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * BackupVault is not valid and cannot be used. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + /** + * BackupVault is being updated. + * + * Generated from protobuf enum UPDATING = 5; + */ + const UPDATING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\BackupVault_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php new file mode 100644 index 000000000000..85f410d1b5f7 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php @@ -0,0 +1,178 @@ +google.cloud.netapp.v1.CreateActiveDirectoryRequest + */ +class CreateActiveDirectoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Fields of the to be created active directory. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $active_directory = null; + /** + * Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * + * Generated from protobuf field string active_directory_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $active_directory_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory Required. Fields of the to be created active directory. + * @param string $activeDirectoryId Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateActiveDirectoryRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory, string $activeDirectoryId): self + { + return (new self()) + ->setParent($parent) + ->setActiveDirectory($activeDirectory) + ->setActiveDirectoryId($activeDirectoryId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type \Google\Cloud\NetApp\V1\ActiveDirectory $active_directory + * Required. Fields of the to be created active directory. + * @type string $active_directory_id + * Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Fields of the to be created active directory. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\ActiveDirectory|null + */ + public function getActiveDirectory() + { + return $this->active_directory; + } + + public function hasActiveDirectory() + { + return isset($this->active_directory); + } + + public function clearActiveDirectory() + { + unset($this->active_directory); + } + + /** + * Required. Fields of the to be created active directory. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\ActiveDirectory $var + * @return $this + */ + public function setActiveDirectory($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\ActiveDirectory::class); + $this->active_directory = $var; + + return $this; + } + + /** + * Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * + * Generated from protobuf field string active_directory_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getActiveDirectoryId() + { + return $this->active_directory_id; + } + + /** + * Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * + * Generated from protobuf field string active_directory_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setActiveDirectoryId($var) + { + GPBUtil::checkString($var, True); + $this->active_directory_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php new file mode 100644 index 000000000000..3141db1c5cb2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php @@ -0,0 +1,188 @@ +google.cloud.netapp.v1.CreateBackupPolicyRequest + */ +class CreateBackupPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A backupPolicy resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_policy = null; + /** + * Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_policy_id = ''; + + /** + * @param string $parent Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy Required. A backupPolicy resource + * @param string $backupPolicyId Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateBackupPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy, string $backupPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setBackupPolicy($backupPolicy) + ->setBackupPolicyId($backupPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * @type \Google\Cloud\NetApp\V1\BackupPolicy $backup_policy + * Required. A backupPolicy resource + * @type string $backup_policy_id + * Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A backupPolicy resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\BackupPolicy|null + */ + public function getBackupPolicy() + { + return $this->backup_policy; + } + + public function hasBackupPolicy() + { + return isset($this->backup_policy); + } + + public function clearBackupPolicy() + { + unset($this->backup_policy); + } + + /** + * Required. A backupPolicy resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\BackupPolicy $var + * @return $this + */ + public function setBackupPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupPolicy::class); + $this->backup_policy = $var; + + return $this; + } + + /** + * Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackupPolicyId() + { + return $this->backup_policy_id; + } + + /** + * Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->backup_policy_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php new file mode 100644 index 000000000000..c596eeff07b0 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php @@ -0,0 +1,188 @@ +google.cloud.netapp.v1.CreateBackupRequest + */ +class CreateBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_id = ''; + /** + * Required. A backup resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup = null; + + /** + * @param string $parent Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * Please see {@see NetAppClient::backupVaultName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\Backup $backup Required. A backup resource + * @param string $backupId Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateBackupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\Backup $backup, string $backupId): self + { + return (new self()) + ->setParent($parent) + ->setBackup($backup) + ->setBackupId($backupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * @type string $backup_id + * Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @type \Google\Cloud\NetApp\V1\Backup $backup + * Required. A backup resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackupId() + { + return $this->backup_id; + } + + /** + * Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupId($var) + { + GPBUtil::checkString($var, True); + $this->backup_id = $var; + + return $this; + } + + /** + * Required. A backup resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Backup|null + */ + public function getBackup() + { + return $this->backup; + } + + public function hasBackup() + { + return isset($this->backup); + } + + public function clearBackup() + { + unset($this->backup); + } + + /** + * Required. A backup resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Backup $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Backup::class); + $this->backup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php new file mode 100644 index 000000000000..ca894cae60dd --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php @@ -0,0 +1,188 @@ +google.cloud.netapp.v1.CreateBackupVaultRequest + */ +class CreateBackupVaultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_vault_id = ''; + /** + * Required. A backupVault resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_vault = null; + + /** + * @param string $parent Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\BackupVault $backupVault Required. A backupVault resource + * @param string $backupVaultId Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateBackupVaultRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\BackupVault $backupVault, string $backupVaultId): self + { + return (new self()) + ->setParent($parent) + ->setBackupVault($backupVault) + ->setBackupVaultId($backupVaultId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * @type string $backup_vault_id + * Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @type \Google\Cloud\NetApp\V1\BackupVault $backup_vault + * Required. A backupVault resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackupVaultId() + { + return $this->backup_vault_id; + } + + /** + * Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupVaultId($var) + { + GPBUtil::checkString($var, True); + $this->backup_vault_id = $var; + + return $this; + } + + /** + * Required. A backupVault resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\BackupVault|null + */ + public function getBackupVault() + { + return $this->backup_vault; + } + + public function hasBackupVault() + { + return isset($this->backup_vault); + } + + public function clearBackupVault() + { + unset($this->backup_vault); + } + + /** + * Required. A backupVault resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\BackupVault $var + * @return $this + */ + public function setBackupVault($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupVault::class); + $this->backup_vault = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php new file mode 100644 index 000000000000..7de6031f29f5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php @@ -0,0 +1,178 @@ +google.cloud.netapp.v1.CreateKmsConfigRequest + */ +class CreateKmsConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string kms_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_config_id = ''; + /** + * Required. The required parameters to create a new KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_config = null; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\KmsConfig $kmsConfig Required. The required parameters to create a new KmsConfig. + * @param string $kmsConfigId Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateKmsConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\KmsConfig $kmsConfig, string $kmsConfigId): self + { + return (new self()) + ->setParent($parent) + ->setKmsConfig($kmsConfig) + ->setKmsConfigId($kmsConfigId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $kms_config_id + * Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @type \Google\Cloud\NetApp\V1\KmsConfig $kms_config + * Required. The required parameters to create a new KmsConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string kms_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKmsConfigId() + { + return $this->kms_config_id; + } + + /** + * Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string kms_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKmsConfigId($var) + { + GPBUtil::checkString($var, True); + $this->kms_config_id = $var; + + return $this; + } + + /** + * Required. The required parameters to create a new KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\KmsConfig|null + */ + public function getKmsConfig() + { + return $this->kms_config; + } + + public function hasKmsConfig() + { + return isset($this->kms_config); + } + + public function clearKmsConfig() + { + unset($this->kms_config); + } + + /** + * Required. The required parameters to create a new KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\KmsConfig $var + * @return $this + */ + public function setKmsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\KmsConfig::class); + $this->kms_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php new file mode 100644 index 000000000000..e47ad2bac9ce --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php @@ -0,0 +1,183 @@ +google.cloud.netapp.v1.CreateReplicationRequest + */ +class CreateReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $replication = null; + /** + * Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string replication_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $replication_id = ''; + + /** + * @param string $parent Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * Please see {@see NetAppClient::volumeName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\Replication $replication Required. A replication resource + * @param string $replicationId Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateReplicationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\Replication $replication, string $replicationId): self + { + return (new self()) + ->setParent($parent) + ->setReplication($replication) + ->setReplicationId($replicationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @type \Google\Cloud\NetApp\V1\Replication $replication + * Required. A replication resource + * @type string $replication_id + * Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Replication|null + */ + public function getReplication() + { + return $this->replication; + } + + public function hasReplication() + { + return isset($this->replication); + } + + public function clearReplication() + { + unset($this->replication); + } + + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Replication $var + * @return $this + */ + public function setReplication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Replication::class); + $this->replication = $var; + + return $this; + } + + /** + * Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string replication_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReplicationId() + { + return $this->replication_id; + } + + /** + * Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string replication_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReplicationId($var) + { + GPBUtil::checkString($var, True); + $this->replication_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php new file mode 100644 index 000000000000..0056836998ea --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php @@ -0,0 +1,183 @@ +google.cloud.netapp.v1.CreateSnapshotRequest + */ +class CreateSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot = null; + /** + * Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot_id = ''; + + /** + * @param string $parent Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * Please see {@see NetAppClient::volumeName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\Snapshot $snapshot Required. A snapshot resource + * @param string $snapshotId Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateSnapshotRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\Snapshot $snapshot, string $snapshotId): self + { + return (new self()) + ->setParent($parent) + ->setSnapshot($snapshot) + ->setSnapshotId($snapshotId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @type \Google\Cloud\NetApp\V1\Snapshot $snapshot + * Required. A snapshot resource + * @type string $snapshot_id + * Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Snapshot|null + */ + public function getSnapshot() + { + return $this->snapshot; + } + + public function hasSnapshot() + { + return isset($this->snapshot); + } + + public function clearSnapshot() + { + unset($this->snapshot); + } + + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Snapshot $var + * @return $this + */ + public function setSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Snapshot::class); + $this->snapshot = $var; + + return $this; + } + + /** + * Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSnapshotId() + { + return $this->snapshot_id; + } + + /** + * Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSnapshotId($var) + { + GPBUtil::checkString($var, True); + $this->snapshot_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php new file mode 100644 index 000000000000..3a318931d7d9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php @@ -0,0 +1,178 @@ +google.cloud.netapp.v1.CreateStoragePoolRequest + */ +class CreateStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string storage_pool_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $storage_pool_id = ''; + /** + * Required. The required parameters to create a new storage pool. + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $storage_pool = null; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\StoragePool $storagePool Required. The required parameters to create a new storage pool. + * @param string $storagePoolId Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateStoragePoolRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\StoragePool $storagePool, string $storagePoolId): self + { + return (new self()) + ->setParent($parent) + ->setStoragePool($storagePool) + ->setStoragePoolId($storagePoolId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $storage_pool_id + * Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * @type \Google\Cloud\NetApp\V1\StoragePool $storage_pool + * Required. The required parameters to create a new storage pool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string storage_pool_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStoragePoolId() + { + return $this->storage_pool_id; + } + + /** + * Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string storage_pool_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStoragePoolId($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool_id = $var; + + return $this; + } + + /** + * Required. The required parameters to create a new storage pool. + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\StoragePool|null + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + public function hasStoragePool() + { + return isset($this->storage_pool); + } + + public function clearStoragePool() + { + unset($this->storage_pool); + } + + /** + * Required. The required parameters to create a new storage pool. + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\StoragePool $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\StoragePool::class); + $this->storage_pool = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php new file mode 100644 index 000000000000..835184512afe --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php @@ -0,0 +1,178 @@ +google.cloud.netapp.v1.CreateVolumeRequest + */ +class CreateVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * + * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $volume_id = ''; + /** + * Required. The volume being created. + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $volume = null; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\Volume $volume Required. The volume being created. + * @param string $volumeId Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateVolumeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\Volume $volume, string $volumeId): self + { + return (new self()) + ->setParent($parent) + ->setVolume($volume) + ->setVolumeId($volumeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $volume_id + * Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * @type \Google\Cloud\NetApp\V1\Volume $volume + * Required. The volume being created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * + * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVolumeId() + { + return $this->volume_id; + } + + /** + * Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * + * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVolumeId($var) + { + GPBUtil::checkString($var, True); + $this->volume_id = $var; + + return $this; + } + + /** + * Required. The volume being created. + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Volume|null + */ + public function getVolume() + { + return $this->volume; + } + + public function hasVolume() + { + return isset($this->volume); + } + + public function clearVolume() + { + unset($this->volume); + } + + /** + * Required. The volume being created. + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Volume $var + * @return $this + */ + public function setVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Volume::class); + $this->volume = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php new file mode 100644 index 000000000000..fb07517b84df --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php @@ -0,0 +1,169 @@ +google.cloud.netapp.v1.DailySchedule + */ +class DailySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + */ + protected $snapshots_to_keep = null; + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + */ + protected $minute = null; + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + */ + protected $hour = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $snapshots_to_keep + * The maximum number of Snapshots to keep for the hourly schedule + * @type float $minute + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * @type float $hour + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @return float + */ + public function getSnapshotsToKeep() + { + return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; + } + + public function hasSnapshotsToKeep() + { + return isset($this->snapshots_to_keep); + } + + public function clearSnapshotsToKeep() + { + unset($this->snapshots_to_keep); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @param float $var + * @return $this + */ + public function setSnapshotsToKeep($var) + { + GPBUtil::checkDouble($var); + $this->snapshots_to_keep = $var; + + return $this; + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @return float + */ + public function getMinute() + { + return isset($this->minute) ? $this->minute : 0.0; + } + + public function hasMinute() + { + return isset($this->minute); + } + + public function clearMinute() + { + unset($this->minute); + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @param float $var + * @return $this + */ + public function setMinute($var) + { + GPBUtil::checkDouble($var); + $this->minute = $var; + + return $this; + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @return float + */ + public function getHour() + { + return isset($this->hour) ? $this->hour : 0.0; + } + + public function hasHour() + { + return isset($this->hour); + } + + public function clearHour() + { + unset($this->hour); + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @param float $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkDouble($var); + $this->hour = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php new file mode 100644 index 000000000000..9f85f133b428 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.DeleteActiveDirectoryRequest + */ +class DeleteActiveDirectoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the active directory. Please see + * {@see NetAppClient::activeDirectoryName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteActiveDirectoryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the active directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php new file mode 100644 index 000000000000..524eae53e7bf --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.DeleteBackupPolicyRequest + */ +class DeleteBackupPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * Please see {@see NetAppClient::backupPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteBackupPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php new file mode 100644 index 000000000000..3b976a408b57 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.DeleteBackupRequest + */ +class DeleteBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * Please see {@see NetAppClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteBackupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php new file mode 100644 index 000000000000..fa16dbed13a5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.DeleteBackupVaultRequest + */ +class DeleteBackupVaultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * Please see {@see NetAppClient::backupVaultName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteBackupVaultRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php new file mode 100644 index 000000000000..368fe489c48a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.DeleteKmsConfigRequest + */ +class DeleteKmsConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the KmsConfig. Please see + * {@see NetAppClient::kmsConfigName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteKmsConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the KmsConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php new file mode 100644 index 000000000000..e22c8d6c3e0a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.DeleteReplicationRequest + */ +class DeleteReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The replication resource name, in the format + * `projects/*/locations/*/volumes/*/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The replication resource name, in the format + * `projects/*/locations/*/volumes/*/replications/{replication_id}` + * Please see {@see NetAppClient::replicationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteReplicationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The replication resource name, in the format + * `projects/*/locations/*/volumes/*/replications/{replication_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The replication resource name, in the format + * `projects/*/locations/*/volumes/*/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The replication resource name, in the format + * `projects/*/locations/*/volumes/*/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php new file mode 100644 index 000000000000..90dfc2ca707f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.DeleteSnapshotRequest + */ +class DeleteSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The snapshot resource name, in the format + * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The snapshot resource name, in the format + * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + * Please see {@see NetAppClient::snapshotName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteSnapshotRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The snapshot resource name, in the format + * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The snapshot resource name, in the format + * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The snapshot resource name, in the format + * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php new file mode 100644 index 000000000000..44252d0f2869 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.DeleteStoragePoolRequest + */ +class DeleteStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the storage pool + * Please see {@see NetAppClient::storagePoolName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteStoragePoolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the storage pool + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php new file mode 100644 index 000000000000..93bbaa37288f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php @@ -0,0 +1,123 @@ +google.cloud.netapp.v1.DeleteVolumeRequest + */ +class DeleteVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. Name of the volume + * Please see {@see NetAppClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteVolumeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the volume + * @type bool $force + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php new file mode 100644 index 000000000000..c16912726bb3 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php @@ -0,0 +1,240 @@ +google.cloud.netapp.v1.DestinationVolumeParameters + */ +class DestinationVolumeParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Existing destination StoragePool name. + * + * Generated from protobuf field string storage_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $storage_pool = ''; + /** + * Desired destination volume resource id. If not specified, source volume's + * resource id will be used. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * + * Generated from protobuf field string volume_id = 2; + */ + protected $volume_id = ''; + /** + * Destination volume's share name. If not specified, source volume's share + * name will be used. + * + * Generated from protobuf field string share_name = 3; + */ + protected $share_name = ''; + /** + * Description for the destination volume. + * + * Generated from protobuf field optional string description = 4; + */ + protected $description = null; + /** + * Optional. Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tiering_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $storage_pool + * Required. Existing destination StoragePool name. + * @type string $volume_id + * Desired destination volume resource id. If not specified, source volume's + * resource id will be used. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * @type string $share_name + * Destination volume's share name. If not specified, source volume's share + * name will be used. + * @type string $description + * Description for the destination volume. + * @type \Google\Cloud\NetApp\V1\TieringPolicy $tiering_policy + * Optional. Tiering policy for the volume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. Existing destination StoragePool name. + * + * Generated from protobuf field string storage_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + /** + * Required. Existing destination StoragePool name. + * + * Generated from protobuf field string storage_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool = $var; + + return $this; + } + + /** + * Desired destination volume resource id. If not specified, source volume's + * resource id will be used. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * + * Generated from protobuf field string volume_id = 2; + * @return string + */ + public function getVolumeId() + { + return $this->volume_id; + } + + /** + * Desired destination volume resource id. If not specified, source volume's + * resource id will be used. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * + * Generated from protobuf field string volume_id = 2; + * @param string $var + * @return $this + */ + public function setVolumeId($var) + { + GPBUtil::checkString($var, True); + $this->volume_id = $var; + + return $this; + } + + /** + * Destination volume's share name. If not specified, source volume's share + * name will be used. + * + * Generated from protobuf field string share_name = 3; + * @return string + */ + public function getShareName() + { + return $this->share_name; + } + + /** + * Destination volume's share name. If not specified, source volume's share + * name will be used. + * + * Generated from protobuf field string share_name = 3; + * @param string $var + * @return $this + */ + public function setShareName($var) + { + GPBUtil::checkString($var, True); + $this->share_name = $var; + + return $this; + } + + /** + * Description for the destination volume. + * + * Generated from protobuf field optional string description = 4; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * Description for the destination volume. + * + * Generated from protobuf field optional string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetApp\V1\TieringPolicy|null + */ + public function getTieringPolicy() + { + return $this->tiering_policy; + } + + public function hasTieringPolicy() + { + return isset($this->tiering_policy); + } + + public function clearTieringPolicy() + { + unset($this->tiering_policy); + } + + /** + * Optional. Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetApp\V1\TieringPolicy $var + * @return $this + */ + public function setTieringPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\TieringPolicy::class); + $this->tiering_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php new file mode 100644 index 000000000000..7a744422eb39 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php @@ -0,0 +1,67 @@ +google.cloud.netapp.v1.EncryptVolumesRequest + */ +class EncryptVolumesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the KmsConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php new file mode 100644 index 000000000000..24cfc16d5a78 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php @@ -0,0 +1,61 @@ +google.cloud.netapp.v1.EncryptionType + */ +class EncryptionType +{ + /** + * The source of the encryption key is not specified. + * + * Generated from protobuf enum ENCRYPTION_TYPE_UNSPECIFIED = 0; + */ + const ENCRYPTION_TYPE_UNSPECIFIED = 0; + /** + * Google managed encryption key. + * + * Generated from protobuf enum SERVICE_MANAGED = 1; + */ + const SERVICE_MANAGED = 1; + /** + * Customer managed encryption key, which is stored in KMS. + * + * Generated from protobuf enum CLOUD_KMS = 2; + */ + const CLOUD_KMS = 2; + + private static $valueToName = [ + self::ENCRYPTION_TYPE_UNSPECIFIED => 'ENCRYPTION_TYPE_UNSPECIFIED', + self::SERVICE_MANAGED => 'SERVICE_MANAGED', + self::CLOUD_KMS => 'CLOUD_KMS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php new file mode 100644 index 000000000000..637a539ee544 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php @@ -0,0 +1,220 @@ +google.cloud.netapp.v1.EstablishPeeringRequest + */ +class EstablishPeeringRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_cluster_name = ''; + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_svm_name = ''; + /** + * Optional. List of IPv4 ip addresses to be used for peering. + * + * Generated from protobuf field repeated string peer_ip_addresses = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $peer_ip_addresses; + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_volume_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @type string $peer_cluster_name + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * @type string $peer_svm_name + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * @type array|\Google\Protobuf\Internal\RepeatedField $peer_ip_addresses + * Optional. List of IPv4 ip addresses to be used for peering. + * @type string $peer_volume_name + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerClusterName() + { + return $this->peer_cluster_name; + } + + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerClusterName($var) + { + GPBUtil::checkString($var, True); + $this->peer_cluster_name = $var; + + return $this; + } + + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerSvmName() + { + return $this->peer_svm_name; + } + + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerSvmName($var) + { + GPBUtil::checkString($var, True); + $this->peer_svm_name = $var; + + return $this; + } + + /** + * Optional. List of IPv4 ip addresses to be used for peering. + * + * Generated from protobuf field repeated string peer_ip_addresses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPeerIpAddresses() + { + return $this->peer_ip_addresses; + } + + /** + * Optional. List of IPv4 ip addresses to be used for peering. + * + * Generated from protobuf field repeated string peer_ip_addresses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPeerIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->peer_ip_addresses = $arr; + + return $this; + } + + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerVolumeName() + { + return $this->peer_volume_name; + } + + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerVolumeName($var) + { + GPBUtil::checkString($var, True); + $this->peer_volume_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php new file mode 100644 index 000000000000..7452cf250eba --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php @@ -0,0 +1,67 @@ +google.cloud.netapp.v1.ExportPolicy + */ +class ExportPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. List of export policy rules + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SimpleExportPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\SimpleExportPolicyRule>|\Google\Protobuf\Internal\RepeatedField $rules + * Required. List of export policy rules + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. List of export policy rules + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SimpleExportPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Required. List of export policy rules + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SimpleExportPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetApp\V1\SimpleExportPolicyRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\SimpleExportPolicyRule::class); + $this->rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php new file mode 100644 index 000000000000..8125d94acc5a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.GetActiveDirectoryRequest + */ +class GetActiveDirectoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the active directory. Please see + * {@see NetAppClient::activeDirectoryName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetActiveDirectoryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the active directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php new file mode 100644 index 000000000000..afc95a636959 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.GetBackupPolicyRequest + */ +class GetBackupPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * Please see {@see NetAppClient::backupPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetBackupPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php new file mode 100644 index 000000000000..4f40eedc772b --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.GetBackupRequest + */ +class GetBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * Please see {@see NetAppClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetBackupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php new file mode 100644 index 000000000000..37d04bfb3d82 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.GetBackupVaultRequest + */ +class GetBackupVaultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * Please see {@see NetAppClient::backupVaultName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetBackupVaultRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php new file mode 100644 index 000000000000..391aa6fbb72a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.GetKmsConfigRequest + */ +class GetKmsConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the KmsConfig + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the KmsConfig + * Please see {@see NetAppClient::kmsConfigName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetKmsConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the KmsConfig + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the KmsConfig + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the KmsConfig + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php new file mode 100644 index 000000000000..456237ad8ebb --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.GetReplicationRequest + */ +class GetReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * Please see {@see NetAppClient::replicationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetReplicationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php new file mode 100644 index 000000000000..6bb68cf6807a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.GetSnapshotRequest + */ +class GetSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * Please see {@see NetAppClient::snapshotName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetSnapshotRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php new file mode 100644 index 000000000000..43f77ba0f851 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.GetStoragePoolRequest + */ +class GetStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the storage pool + * Please see {@see NetAppClient::storagePoolName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetStoragePoolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the storage pool + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php new file mode 100644 index 000000000000..fc00eb0d5379 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.GetVolumeRequest + */ +class GetVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the volume + * Please see {@see NetAppClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetVolumeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the volume + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php new file mode 100644 index 000000000000..262ca6d4df72 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php @@ -0,0 +1,125 @@ +google.cloud.netapp.v1.HourlySchedule + */ +class HourlySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + */ + protected $snapshots_to_keep = null; + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + */ + protected $minute = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $snapshots_to_keep + * The maximum number of Snapshots to keep for the hourly schedule + * @type float $minute + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @return float + */ + public function getSnapshotsToKeep() + { + return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; + } + + public function hasSnapshotsToKeep() + { + return isset($this->snapshots_to_keep); + } + + public function clearSnapshotsToKeep() + { + unset($this->snapshots_to_keep); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @param float $var + * @return $this + */ + public function setSnapshotsToKeep($var) + { + GPBUtil::checkDouble($var); + $this->snapshots_to_keep = $var; + + return $this; + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @return float + */ + public function getMinute() + { + return isset($this->minute) ? $this->minute : 0.0; + } + + public function hasMinute() + { + return isset($this->minute); + } + + public function clearMinute() + { + unset($this->minute); + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @param float $var + * @return $this + */ + public function setMinute($var) + { + GPBUtil::checkDouble($var); + $this->minute = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php new file mode 100644 index 000000000000..ad8cfec53387 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php @@ -0,0 +1,187 @@ +google.cloud.netapp.v1.HybridPeeringDetails + */ +class HybridPeeringDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. IP address of the subnet. + * + * Generated from protobuf field string subnet_ip = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnet_ip = ''; + /** + * Optional. Copy-paste-able commands to be used on user's ONTAP to accept + * peering requests. + * + * Generated from protobuf field string command = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $command = ''; + /** + * Optional. Expiration time for the peering command to be executed on user's + * ONTAP. + * + * Generated from protobuf field .google.protobuf.Timestamp command_expiry_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $command_expiry_time = null; + /** + * Optional. Temporary passphrase generated to accept cluster peering command. + * + * Generated from protobuf field string passphrase = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $passphrase = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $subnet_ip + * Optional. IP address of the subnet. + * @type string $command + * Optional. Copy-paste-able commands to be used on user's ONTAP to accept + * peering requests. + * @type \Google\Protobuf\Timestamp $command_expiry_time + * Optional. Expiration time for the peering command to be executed on user's + * ONTAP. + * @type string $passphrase + * Optional. Temporary passphrase generated to accept cluster peering command. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Optional. IP address of the subnet. + * + * Generated from protobuf field string subnet_ip = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnetIp() + { + return $this->subnet_ip; + } + + /** + * Optional. IP address of the subnet. + * + * Generated from protobuf field string subnet_ip = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnetIp($var) + { + GPBUtil::checkString($var, True); + $this->subnet_ip = $var; + + return $this; + } + + /** + * Optional. Copy-paste-able commands to be used on user's ONTAP to accept + * peering requests. + * + * Generated from protobuf field string command = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCommand() + { + return $this->command; + } + + /** + * Optional. Copy-paste-able commands to be used on user's ONTAP to accept + * peering requests. + * + * Generated from protobuf field string command = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCommand($var) + { + GPBUtil::checkString($var, True); + $this->command = $var; + + return $this; + } + + /** + * Optional. Expiration time for the peering command to be executed on user's + * ONTAP. + * + * Generated from protobuf field .google.protobuf.Timestamp command_expiry_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommandExpiryTime() + { + return $this->command_expiry_time; + } + + public function hasCommandExpiryTime() + { + return isset($this->command_expiry_time); + } + + public function clearCommandExpiryTime() + { + unset($this->command_expiry_time); + } + + /** + * Optional. Expiration time for the peering command to be executed on user's + * ONTAP. + * + * Generated from protobuf field .google.protobuf.Timestamp command_expiry_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommandExpiryTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->command_expiry_time = $var; + + return $this; + } + + /** + * Optional. Temporary passphrase generated to accept cluster peering command. + * + * Generated from protobuf field string passphrase = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPassphrase() + { + return $this->passphrase; + } + + /** + * Optional. Temporary passphrase generated to accept cluster peering command. + * + * Generated from protobuf field string passphrase = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPassphrase($var) + { + GPBUtil::checkString($var, True); + $this->passphrase = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php new file mode 100644 index 000000000000..1f575f542813 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php @@ -0,0 +1,329 @@ +google.cloud.netapp.v1.HybridReplicationParameters + */ +class HybridReplicationParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Desired Identifier (name) of the replication which will be created for this volume. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string replication = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $replication = ''; + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_volume_name = ''; + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_cluster_name = ''; + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_svm_name = ''; + /** + * Required. List of node ip addresses to be peered with. + * + * Generated from protobuf field repeated string peer_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $peer_ip_addresses; + /** + * Optional. Name of source cluster location associated with the Hybrid + * replication. This is a free-form field for the display purpose only. + * + * Generated from protobuf field string cluster_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_location = ''; + /** + * Optional. Description of the replication. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Labels to be added to the replication as the key value pairs. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $replication + * Required. Desired Identifier (name) of the replication which will be created for this volume. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * @type string $peer_volume_name + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * @type string $peer_cluster_name + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * @type string $peer_svm_name + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * @type array|\Google\Protobuf\Internal\RepeatedField $peer_ip_addresses + * Required. List of node ip addresses to be peered with. + * @type string $cluster_location + * Optional. Name of source cluster location associated with the Hybrid + * replication. This is a free-form field for the display purpose only. + * @type string $description + * Optional. Description of the replication. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels to be added to the replication as the key value pairs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Desired Identifier (name) of the replication which will be created for this volume. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string replication = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getReplication() + { + return $this->replication; + } + + /** + * Required. Desired Identifier (name) of the replication which will be created for this volume. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string replication = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setReplication($var) + { + GPBUtil::checkString($var, True); + $this->replication = $var; + + return $this; + } + + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerVolumeName() + { + return $this->peer_volume_name; + } + + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerVolumeName($var) + { + GPBUtil::checkString($var, True); + $this->peer_volume_name = $var; + + return $this; + } + + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerClusterName() + { + return $this->peer_cluster_name; + } + + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerClusterName($var) + { + GPBUtil::checkString($var, True); + $this->peer_cluster_name = $var; + + return $this; + } + + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerSvmName() + { + return $this->peer_svm_name; + } + + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerSvmName($var) + { + GPBUtil::checkString($var, True); + $this->peer_svm_name = $var; + + return $this; + } + + /** + * Required. List of node ip addresses to be peered with. + * + * Generated from protobuf field repeated string peer_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPeerIpAddresses() + { + return $this->peer_ip_addresses; + } + + /** + * Required. List of node ip addresses to be peered with. + * + * Generated from protobuf field repeated string peer_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPeerIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->peer_ip_addresses = $arr; + + return $this; + } + + /** + * Optional. Name of source cluster location associated with the Hybrid + * replication. This is a free-form field for the display purpose only. + * + * Generated from protobuf field string cluster_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterLocation() + { + return $this->cluster_location; + } + + /** + * Optional. Name of source cluster location associated with the Hybrid + * replication. This is a free-form field for the display purpose only. + * + * Generated from protobuf field string cluster_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterLocation($var) + { + GPBUtil::checkString($var, True); + $this->cluster_location = $var; + + return $this; + } + + /** + * Optional. Description of the replication. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the replication. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Labels to be added to the replication as the key value pairs. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels to be added to the replication as the key value pairs. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php new file mode 100644 index 000000000000..944e5aec0eb9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php @@ -0,0 +1,361 @@ +google.cloud.netapp.v1.KmsConfig + */ +class KmsConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Customer managed crypto key resource full name. Format: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + * + * Generated from protobuf field string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key_name = ''; + /** + * Output only. State of the KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. State details of the KmsConfig. + * + * Generated from protobuf field string state_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * Output only. Create time of the KmsConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Description of the KmsConfig. + * + * Generated from protobuf field string description = 6; + */ + protected $description = ''; + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 7; + */ + private $labels; + /** + * Output only. Instructions to provide the access to the customer provided + * encryption key. + * + * Generated from protobuf field string instructions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $instructions = ''; + /** + * Output only. The Service account which will have access to the customer + * provided encryption key. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the KmsConfig. + * @type string $crypto_key_name + * Required. Customer managed crypto key resource full name. Format: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + * @type int $state + * Output only. State of the KmsConfig. + * @type string $state_details + * Output only. State details of the KmsConfig. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the KmsConfig. + * @type string $description + * Description of the KmsConfig. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs + * @type string $instructions + * Output only. Instructions to provide the access to the customer provided + * encryption key. + * @type string $service_account + * Output only. The Service account which will have access to the customer + * provided encryption key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Customer managed crypto key resource full name. Format: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + * + * Generated from protobuf field string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCryptoKeyName() + { + return $this->crypto_key_name; + } + + /** + * Required. Customer managed crypto key resource full name. Format: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + * + * Generated from protobuf field string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCryptoKeyName($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_name = $var; + + return $this; + } + + /** + * Output only. State of the KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\KmsConfig\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. State details of the KmsConfig. + * + * Generated from protobuf field string state_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. State details of the KmsConfig. + * + * Generated from protobuf field string state_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * Output only. Create time of the KmsConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the KmsConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Description of the KmsConfig. + * + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the KmsConfig. + * + * Generated from protobuf field string description = 6; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Instructions to provide the access to the customer provided + * encryption key. + * + * Generated from protobuf field string instructions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getInstructions() + { + return $this->instructions; + } + + /** + * Output only. Instructions to provide the access to the customer provided + * encryption key. + * + * Generated from protobuf field string instructions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setInstructions($var) + { + GPBUtil::checkString($var, True); + $this->instructions = $var; + + return $this; + } + + /** + * Output only. The Service account which will have access to the customer + * provided encryption key. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Output only. The Service account which will have access to the customer + * provided encryption key. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php new file mode 100644 index 000000000000..be95b3617df0 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php @@ -0,0 +1,129 @@ +google.cloud.netapp.v1.KmsConfig.State + */ +class State +{ + /** + * Unspecified KmsConfig State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * KmsConfig State is Ready + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * KmsConfig State is Creating + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * KmsConfig State is Deleting + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * KmsConfig State is Updating + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * KmsConfig State is In Use. + * + * Generated from protobuf enum IN_USE = 5; + */ + const IN_USE = 5; + /** + * KmsConfig State is Error + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + /** + * KmsConfig State is Pending to verify crypto key access. + * + * Generated from protobuf enum KEY_CHECK_PENDING = 7; + */ + const KEY_CHECK_PENDING = 7; + /** + * KmsConfig State is Not accessbile by the SDE service account to the + * crypto key. + * + * Generated from protobuf enum KEY_NOT_REACHABLE = 8; + */ + const KEY_NOT_REACHABLE = 8; + /** + * KmsConfig State is Disabling. + * + * Generated from protobuf enum DISABLING = 9; + */ + const DISABLING = 9; + /** + * KmsConfig State is Disabled. + * + * Generated from protobuf enum DISABLED = 10; + */ + const DISABLED = 10; + /** + * KmsConfig State is Migrating. + * The existing volumes are migrating from SMEK to CMEK. + * + * Generated from protobuf enum MIGRATING = 11; + */ + const MIGRATING = 11; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::IN_USE => 'IN_USE', + self::ERROR => 'ERROR', + self::KEY_CHECK_PENDING => 'KEY_CHECK_PENDING', + self::KEY_NOT_REACHABLE => 'KEY_NOT_REACHABLE', + self::DISABLING => 'DISABLING', + self::DISABLED => 'DISABLED', + self::MIGRATING => 'MIGRATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\KmsConfig_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php new file mode 100644 index 000000000000..4a250718ad7d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php @@ -0,0 +1,221 @@ +google.cloud.netapp.v1.ListActiveDirectoriesRequest + */ +class ListActiveDirectoriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListActiveDirectoriesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListActiveDirectoriesRequest + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListActiveDirectoriesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListActiveDirectoriesRequest + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListActiveDirectoriesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListActiveDirectoriesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php new file mode 100644 index 000000000000..3a969308213a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php @@ -0,0 +1,135 @@ +google.cloud.netapp.v1.ListActiveDirectoriesResponse + */ +class ListActiveDirectoriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of active directories. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ActiveDirectory active_directories = 1; + */ + private $active_directories; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\ActiveDirectory>|\Google\Protobuf\Internal\RepeatedField $active_directories + * The list of active directories. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * The list of active directories. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ActiveDirectory active_directories = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActiveDirectories() + { + return $this->active_directories; + } + + /** + * The list of active directories. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ActiveDirectory active_directories = 1; + * @param array<\Google\Cloud\NetApp\V1\ActiveDirectory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActiveDirectories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\ActiveDirectory::class); + $this->active_directories = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php new file mode 100644 index 000000000000..3c09f390e605 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php @@ -0,0 +1,221 @@ +google.cloud.netapp.v1.ListBackupPoliciesRequest + */ +class ListBackupPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListBackupPoliciesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListBackupPoliciesRequest + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListBackupPoliciesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListBackupPoliciesRequest + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListBackupPoliciesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListBackupPoliciesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php new file mode 100644 index 000000000000..4ba28b94e4f2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php @@ -0,0 +1,135 @@ +google.cloud.netapp.v1.ListBackupPoliciesResponse + */ +class ListBackupPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of backup policies. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + private $backup_policies; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\BackupPolicy>|\Google\Protobuf\Internal\RepeatedField $backup_policies + * The list of backup policies. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * The list of backup policies. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackupPolicies() + { + return $this->backup_policies; + } + + /** + * The list of backup policies. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + * @param array<\Google\Cloud\NetApp\V1\BackupPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackupPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\BackupPolicy::class); + $this->backup_policies = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php new file mode 100644 index 000000000000..b70bf899489e --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php @@ -0,0 +1,231 @@ +google.cloud.netapp.v1.ListBackupVaultsRequest + */ +class ListBackupVaultsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. Please see + * {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListBackupVaultsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php new file mode 100644 index 000000000000..17aeb5e202f6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php @@ -0,0 +1,139 @@ +google.cloud.netapp.v1.ListBackupVaultsResponse + */ +class ListBackupVaultsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of backupVaults in the project for the specified location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + private $backup_vaults; + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\BackupVault>|\Google\Protobuf\Internal\RepeatedField $backup_vaults + * A list of backupVaults in the project for the specified location. + * @type string $next_page_token + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * A list of backupVaults in the project for the specified location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackupVaults() + { + return $this->backup_vaults; + } + + /** + * A list of backupVaults in the project for the specified location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + * @param array<\Google\Cloud\NetApp\V1\BackupVault>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackupVaults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\BackupVault::class); + $this->backup_vaults = $arr; + + return $this; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php new file mode 100644 index 000000000000..8d3ddd06601e --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php @@ -0,0 +1,281 @@ +google.cloud.netapp.v1.ListBackupsRequest + */ +class ListBackupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. Please see + * {@see NetAppClient::backupVaultName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListBackupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * @type int $page_size + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php new file mode 100644 index 000000000000..74b5007b5630 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php @@ -0,0 +1,139 @@ +google.cloud.netapp.v1.ListBackupsResponse + */ +class ListBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + private $backups; + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups + * A list of backups in the project. + * @type string $next_page_token + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Backup backups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackups() + { + return $this->backups; + } + + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Backup backups = 1; + * @param array<\Google\Cloud\NetApp\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Backup::class); + $this->backups = $arr; + + return $this; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php new file mode 100644 index 000000000000..425b86bdb4c0 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php @@ -0,0 +1,221 @@ +google.cloud.netapp.v1.ListKmsConfigsRequest + */ +class ListKmsConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Parent value + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListKmsConfigsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php new file mode 100644 index 000000000000..fd81c2db6c4a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php @@ -0,0 +1,135 @@ +google.cloud.netapp.v1.ListKmsConfigsResponse + */ +class ListKmsConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of KmsConfigs + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.KmsConfig kms_configs = 1; + */ + private $kms_configs; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\KmsConfig>|\Google\Protobuf\Internal\RepeatedField $kms_configs + * The list of KmsConfigs + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * The list of KmsConfigs + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.KmsConfig kms_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKmsConfigs() + { + return $this->kms_configs; + } + + /** + * The list of KmsConfigs + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.KmsConfig kms_configs = 1; + * @param array<\Google\Cloud\NetApp\V1\KmsConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKmsConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\KmsConfig::class); + $this->kms_configs = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php new file mode 100644 index 000000000000..094c76678204 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php @@ -0,0 +1,231 @@ +google.cloud.netapp.v1.ListReplicationsRequest + */ +class ListReplicationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. Please see + * {@see NetAppClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListReplicationsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php new file mode 100644 index 000000000000..49323c831c19 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php @@ -0,0 +1,139 @@ +google.cloud.netapp.v1.ListReplicationsResponse + */ +class ListReplicationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of replications in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Replication replications = 1; + */ + private $replications; + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\Replication>|\Google\Protobuf\Internal\RepeatedField $replications + * A list of replications in the project for the specified volume. + * @type string $next_page_token + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * A list of replications in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Replication replications = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReplications() + { + return $this->replications; + } + + /** + * A list of replications in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Replication replications = 1; + * @param array<\Google\Cloud\NetApp\V1\Replication>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReplications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Replication::class); + $this->replications = $arr; + + return $this; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php new file mode 100644 index 000000000000..d2539ad77f88 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php @@ -0,0 +1,231 @@ +google.cloud.netapp.v1.ListSnapshotsRequest + */ +class ListSnapshotsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. Please see + * {@see NetAppClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListSnapshotsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php new file mode 100644 index 000000000000..78b8503f9656 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php @@ -0,0 +1,139 @@ +google.cloud.netapp.v1.ListSnapshotsResponse + */ +class ListSnapshotsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of snapshots in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Snapshot snapshots = 1; + */ + private $snapshots; + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\Snapshot>|\Google\Protobuf\Internal\RepeatedField $snapshots + * A list of snapshots in the project for the specified volume. + * @type string $next_page_token + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * A list of snapshots in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Snapshot snapshots = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSnapshots() + { + return $this->snapshots; + } + + /** + * A list of snapshots in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Snapshot snapshots = 1; + * @param array<\Google\Cloud\NetApp\V1\Snapshot>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSnapshots($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Snapshot::class); + $this->snapshots = $arr; + + return $this; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php new file mode 100644 index 000000000000..6569b9d2c4c5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php @@ -0,0 +1,225 @@ +google.cloud.netapp.v1.ListStoragePoolsRequest + */ +class ListStoragePoolsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. List filter. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Parent value + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListStoragePoolsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value + * @type int $page_size + * Optional. The maximum number of items to return. + * @type string $page_token + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * @type string $filter + * Optional. List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. List filter. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. List filter. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php new file mode 100644 index 000000000000..2aa56a245d4d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php @@ -0,0 +1,135 @@ +google.cloud.netapp.v1.ListStoragePoolsResponse + */ +class ListStoragePoolsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of StoragePools + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.StoragePool storage_pools = 1; + */ + private $storage_pools; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\StoragePool>|\Google\Protobuf\Internal\RepeatedField $storage_pools + * The list of StoragePools + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * The list of StoragePools + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.StoragePool storage_pools = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStoragePools() + { + return $this->storage_pools; + } + + /** + * The list of StoragePools + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.StoragePool storage_pools = 1; + * @param array<\Google\Cloud\NetApp\V1\StoragePool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStoragePools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\StoragePool::class); + $this->storage_pools = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php new file mode 100644 index 000000000000..68b888bed683 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php @@ -0,0 +1,221 @@ +google.cloud.netapp.v1.ListVolumesRequest + */ +class ListVolumesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListVolumesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListVolumesRequest + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListVolumesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListVolumesRequest + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListVolumesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListVolumesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php new file mode 100644 index 000000000000..077e3a87033c --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php @@ -0,0 +1,135 @@ +google.cloud.netapp.v1.ListVolumesResponse + */ +class ListVolumesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Volume volumes = 1; + */ + private $volumes; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * The list of Volume + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The list of Volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Volume volumes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * The list of Volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Volume volumes = 1; + * @param array<\Google\Cloud\NetApp\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php new file mode 100644 index 000000000000..1718fe1bb168 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php @@ -0,0 +1,68 @@ +google.cloud.netapp.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Supported service levels in a location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ServiceLevel supported_service_levels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $supported_service_levels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_service_levels + * Output only. Supported service levels in a location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Supported service levels in a location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ServiceLevel supported_service_levels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedServiceLevels() + { + return $this->supported_service_levels; + } + + /** + * Output only. Supported service levels in a location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ServiceLevel supported_service_levels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedServiceLevels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\ServiceLevel::class); + $this->supported_service_levels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php new file mode 100644 index 000000000000..4cd932549523 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php @@ -0,0 +1,217 @@ +google.cloud.netapp.v1.MonthlySchedule + */ +class MonthlySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + */ + protected $snapshots_to_keep = null; + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + */ + protected $minute = null; + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + */ + protected $hour = null; + /** + * Set the day or days of the month to make a snapshot (1-31). Accepts a + * comma separated number of days. Defaults to '1'. + * + * Generated from protobuf field optional string days_of_month = 4; + */ + protected $days_of_month = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $snapshots_to_keep + * The maximum number of Snapshots to keep for the hourly schedule + * @type float $minute + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * @type float $hour + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * @type string $days_of_month + * Set the day or days of the month to make a snapshot (1-31). Accepts a + * comma separated number of days. Defaults to '1'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @return float + */ + public function getSnapshotsToKeep() + { + return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; + } + + public function hasSnapshotsToKeep() + { + return isset($this->snapshots_to_keep); + } + + public function clearSnapshotsToKeep() + { + unset($this->snapshots_to_keep); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @param float $var + * @return $this + */ + public function setSnapshotsToKeep($var) + { + GPBUtil::checkDouble($var); + $this->snapshots_to_keep = $var; + + return $this; + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @return float + */ + public function getMinute() + { + return isset($this->minute) ? $this->minute : 0.0; + } + + public function hasMinute() + { + return isset($this->minute); + } + + public function clearMinute() + { + unset($this->minute); + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @param float $var + * @return $this + */ + public function setMinute($var) + { + GPBUtil::checkDouble($var); + $this->minute = $var; + + return $this; + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @return float + */ + public function getHour() + { + return isset($this->hour) ? $this->hour : 0.0; + } + + public function hasHour() + { + return isset($this->hour); + } + + public function clearHour() + { + unset($this->hour); + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @param float $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkDouble($var); + $this->hour = $var; + + return $this; + } + + /** + * Set the day or days of the month to make a snapshot (1-31). Accepts a + * comma separated number of days. Defaults to '1'. + * + * Generated from protobuf field optional string days_of_month = 4; + * @return string + */ + public function getDaysOfMonth() + { + return isset($this->days_of_month) ? $this->days_of_month : ''; + } + + public function hasDaysOfMonth() + { + return isset($this->days_of_month); + } + + public function clearDaysOfMonth() + { + unset($this->days_of_month); + } + + /** + * Set the day or days of the month to make a snapshot (1-31). Accepts a + * comma separated number of days. Defaults to '1'. + * + * Generated from protobuf field optional string days_of_month = 4; + * @param string $var + * @return $this + */ + public function setDaysOfMonth($var) + { + GPBUtil::checkString($var, True); + $this->days_of_month = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php new file mode 100644 index 000000000000..7b70200e1081 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php @@ -0,0 +1,169 @@ +google.cloud.netapp.v1.MountOption + */ +class MountOption extends \Google\Protobuf\Internal\Message +{ + /** + * Export string + * + * Generated from protobuf field string export = 1; + */ + protected $export = ''; + /** + * Full export string + * + * Generated from protobuf field string export_full = 2; + */ + protected $export_full = ''; + /** + * Protocol to mount with. + * + * Generated from protobuf field .google.cloud.netapp.v1.Protocols protocol = 3; + */ + protected $protocol = 0; + /** + * Instructions for mounting + * + * Generated from protobuf field string instructions = 4; + */ + protected $instructions = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $export + * Export string + * @type string $export_full + * Full export string + * @type int $protocol + * Protocol to mount with. + * @type string $instructions + * Instructions for mounting + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Export string + * + * Generated from protobuf field string export = 1; + * @return string + */ + public function getExport() + { + return $this->export; + } + + /** + * Export string + * + * Generated from protobuf field string export = 1; + * @param string $var + * @return $this + */ + public function setExport($var) + { + GPBUtil::checkString($var, True); + $this->export = $var; + + return $this; + } + + /** + * Full export string + * + * Generated from protobuf field string export_full = 2; + * @return string + */ + public function getExportFull() + { + return $this->export_full; + } + + /** + * Full export string + * + * Generated from protobuf field string export_full = 2; + * @param string $var + * @return $this + */ + public function setExportFull($var) + { + GPBUtil::checkString($var, True); + $this->export_full = $var; + + return $this; + } + + /** + * Protocol to mount with. + * + * Generated from protobuf field .google.cloud.netapp.v1.Protocols protocol = 3; + * @return int + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Protocol to mount with. + * + * Generated from protobuf field .google.cloud.netapp.v1.Protocols protocol = 3; + * @param int $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Protocols::class); + $this->protocol = $var; + + return $this; + } + + /** + * Instructions for mounting + * + * Generated from protobuf field string instructions = 4; + * @return string + */ + public function getInstructions() + { + return $this->instructions; + } + + /** + * Instructions for mounting + * + * Generated from protobuf field string instructions = 4; + * @param string $var + * @return $this + */ + public function setInstructions($var) + { + GPBUtil::checkString($var, True); + $this->instructions = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php new file mode 100644 index 000000000000..58b129644ac9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.netapp.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been canceled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been canceled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\CloudNetappService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been canceled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been canceled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php new file mode 100644 index 000000000000..bda324fe0c87 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php @@ -0,0 +1,68 @@ +google.cloud.netapp.v1.Protocols + */ +class Protocols +{ + /** + * Unspecified protocol + * + * Generated from protobuf enum PROTOCOLS_UNSPECIFIED = 0; + */ + const PROTOCOLS_UNSPECIFIED = 0; + /** + * NFS V3 protocol + * + * Generated from protobuf enum NFSV3 = 1; + */ + const NFSV3 = 1; + /** + * NFS V4 protocol + * + * Generated from protobuf enum NFSV4 = 2; + */ + const NFSV4 = 2; + /** + * SMB protocol + * + * Generated from protobuf enum SMB = 3; + */ + const SMB = 3; + + private static $valueToName = [ + self::PROTOCOLS_UNSPECIFIED => 'PROTOCOLS_UNSPECIFIED', + self::NFSV3 => 'NFSV3', + self::NFSV4 => 'NFSV4', + self::SMB => 'SMB', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php new file mode 100644 index 000000000000..3d6b2d73def4 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php @@ -0,0 +1,705 @@ +google.cloud.netapp.v1.Replication + */ +class Replication extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the Replication. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. State of the replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. State details of the replication. + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * Output only. Indicates whether this points to source or destination. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $role = 0; + /** + * Required. Indicates the schedule for replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $replication_schedule = 0; + /** + * Output only. Indicates the state of mirroring. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $mirror_state = 0; + /** + * Output only. Condition of the relationship. Can be one of the following: + * - true: The replication relationship is healthy. It has not missed the most + * recent scheduled transfer. + * - false: The replication relationship is not healthy. It has missed the + * most recent scheduled transfer. + * + * Generated from protobuf field optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $healthy = null; + /** + * Output only. Replication create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Full name of destination volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string destination_volume = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $destination_volume = ''; + /** + * Output only. Replication transfer statistics. + * + * Generated from protobuf field .google.cloud.netapp.v1.TransferStats transfer_stats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $transfer_stats = null; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 12; + */ + private $labels; + /** + * A description about this replication relationship. + * + * Generated from protobuf field optional string description = 13; + */ + protected $description = null; + /** + * Required. Input only. Destination volume parameters + * + * Generated from protobuf field .google.cloud.netapp.v1.DestinationVolumeParameters destination_volume_parameters = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + */ + protected $destination_volume_parameters = null; + /** + * Output only. Full name of source volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string source_volume = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $source_volume = ''; + /** + * Output only. Hybrid peering details. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridPeeringDetails hybrid_peering_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hybrid_peering_details = null; + /** + * Optional. Location of the user cluster. + * + * Generated from protobuf field string cluster_location = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_location = ''; + /** + * Output only. Type of the hybrid replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.HybridReplicationType hybrid_replication_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hybrid_replication_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the Replication. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + * @type int $state + * Output only. State of the replication. + * @type string $state_details + * Output only. State details of the replication. + * @type int $role + * Output only. Indicates whether this points to source or destination. + * @type int $replication_schedule + * Required. Indicates the schedule for replication. + * @type int $mirror_state + * Output only. Indicates the state of mirroring. + * @type bool $healthy + * Output only. Condition of the relationship. Can be one of the following: + * - true: The replication relationship is healthy. It has not missed the most + * recent scheduled transfer. + * - false: The replication relationship is not healthy. It has missed the + * most recent scheduled transfer. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Replication create time. + * @type string $destination_volume + * Output only. Full name of destination volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * @type \Google\Cloud\NetApp\V1\TransferStats $transfer_stats + * Output only. Replication transfer statistics. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * @type string $description + * A description about this replication relationship. + * @type \Google\Cloud\NetApp\V1\DestinationVolumeParameters $destination_volume_parameters + * Required. Input only. Destination volume parameters + * @type string $source_volume + * Output only. Full name of source volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * @type \Google\Cloud\NetApp\V1\HybridPeeringDetails $hybrid_peering_details + * Output only. Hybrid peering details. + * @type string $cluster_location + * Optional. Location of the user cluster. + * @type int $hybrid_replication_type + * Output only. Type of the hybrid replication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the Replication. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the Replication. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. State of the replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. State details of the replication. + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. State details of the replication. + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * Output only. Indicates whether this points to source or destination. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRole() + { + return $this->role; + } + + /** + * Output only. Indicates whether this points to source or destination. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\ReplicationRole::class); + $this->role = $var; + + return $this; + } + + /** + * Required. Indicates the schedule for replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReplicationSchedule() + { + return $this->replication_schedule; + } + + /** + * Required. Indicates the schedule for replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReplicationSchedule($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\ReplicationSchedule::class); + $this->replication_schedule = $var; + + return $this; + } + + /** + * Output only. Indicates the state of mirroring. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMirrorState() + { + return $this->mirror_state; + } + + /** + * Output only. Indicates the state of mirroring. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMirrorState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\MirrorState::class); + $this->mirror_state = $var; + + return $this; + } + + /** + * Output only. Condition of the relationship. Can be one of the following: + * - true: The replication relationship is healthy. It has not missed the most + * recent scheduled transfer. + * - false: The replication relationship is not healthy. It has missed the + * most recent scheduled transfer. + * + * Generated from protobuf field optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getHealthy() + { + return isset($this->healthy) ? $this->healthy : false; + } + + public function hasHealthy() + { + return isset($this->healthy); + } + + public function clearHealthy() + { + unset($this->healthy); + } + + /** + * Output only. Condition of the relationship. Can be one of the following: + * - true: The replication relationship is healthy. It has not missed the most + * recent scheduled transfer. + * - false: The replication relationship is not healthy. It has missed the + * most recent scheduled transfer. + * + * Generated from protobuf field optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setHealthy($var) + { + GPBUtil::checkBool($var); + $this->healthy = $var; + + return $this; + } + + /** + * Output only. Replication create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Replication create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Full name of destination volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string destination_volume = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getDestinationVolume() + { + return $this->destination_volume; + } + + /** + * Output only. Full name of destination volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string destination_volume = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDestinationVolume($var) + { + GPBUtil::checkString($var, True); + $this->destination_volume = $var; + + return $this; + } + + /** + * Output only. Replication transfer statistics. + * + * Generated from protobuf field .google.cloud.netapp.v1.TransferStats transfer_stats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\NetApp\V1\TransferStats|null + */ + public function getTransferStats() + { + return $this->transfer_stats; + } + + public function hasTransferStats() + { + return isset($this->transfer_stats); + } + + public function clearTransferStats() + { + unset($this->transfer_stats); + } + + /** + * Output only. Replication transfer statistics. + * + * Generated from protobuf field .google.cloud.netapp.v1.TransferStats transfer_stats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetApp\V1\TransferStats $var + * @return $this + */ + public function setTransferStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\TransferStats::class); + $this->transfer_stats = $var; + + return $this; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 12; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 12; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * A description about this replication relationship. + * + * Generated from protobuf field optional string description = 13; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * A description about this replication relationship. + * + * Generated from protobuf field optional string description = 13; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Input only. Destination volume parameters + * + * Generated from protobuf field .google.cloud.netapp.v1.DestinationVolumeParameters destination_volume_parameters = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\DestinationVolumeParameters|null + */ + public function getDestinationVolumeParameters() + { + return $this->destination_volume_parameters; + } + + public function hasDestinationVolumeParameters() + { + return isset($this->destination_volume_parameters); + } + + public function clearDestinationVolumeParameters() + { + unset($this->destination_volume_parameters); + } + + /** + * Required. Input only. Destination volume parameters + * + * Generated from protobuf field .google.cloud.netapp.v1.DestinationVolumeParameters destination_volume_parameters = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\DestinationVolumeParameters $var + * @return $this + */ + public function setDestinationVolumeParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\DestinationVolumeParameters::class); + $this->destination_volume_parameters = $var; + + return $this; + } + + /** + * Output only. Full name of source volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string source_volume = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getSourceVolume() + { + return $this->source_volume; + } + + /** + * Output only. Full name of source volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string source_volume = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceVolume($var) + { + GPBUtil::checkString($var, True); + $this->source_volume = $var; + + return $this; + } + + /** + * Output only. Hybrid peering details. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridPeeringDetails hybrid_peering_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\NetApp\V1\HybridPeeringDetails|null + */ + public function getHybridPeeringDetails() + { + return $this->hybrid_peering_details; + } + + public function hasHybridPeeringDetails() + { + return isset($this->hybrid_peering_details); + } + + public function clearHybridPeeringDetails() + { + unset($this->hybrid_peering_details); + } + + /** + * Output only. Hybrid peering details. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridPeeringDetails hybrid_peering_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetApp\V1\HybridPeeringDetails $var + * @return $this + */ + public function setHybridPeeringDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\HybridPeeringDetails::class); + $this->hybrid_peering_details = $var; + + return $this; + } + + /** + * Optional. Location of the user cluster. + * + * Generated from protobuf field string cluster_location = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterLocation() + { + return $this->cluster_location; + } + + /** + * Optional. Location of the user cluster. + * + * Generated from protobuf field string cluster_location = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterLocation($var) + { + GPBUtil::checkString($var, True); + $this->cluster_location = $var; + + return $this; + } + + /** + * Output only. Type of the hybrid replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.HybridReplicationType hybrid_replication_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getHybridReplicationType() + { + return $this->hybrid_replication_type; + } + + /** + * Output only. Type of the hybrid replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.HybridReplicationType hybrid_replication_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setHybridReplicationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\HybridReplicationType::class); + $this->hybrid_replication_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php new file mode 100644 index 000000000000..bf912db51b2b --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php @@ -0,0 +1,64 @@ +google.cloud.netapp.v1.Replication.HybridReplicationType + */ +class HybridReplicationType +{ + /** + * Unspecified hybrid replication type. + * + * Generated from protobuf enum HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0; + */ + const HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0; + /** + * Hybrid replication type for migration. + * + * Generated from protobuf enum MIGRATION = 1; + */ + const MIGRATION = 1; + /** + * Hybrid replication type for continuous replication. + * + * Generated from protobuf enum CONTINUOUS_REPLICATION = 2; + */ + const CONTINUOUS_REPLICATION = 2; + + private static $valueToName = [ + self::HYBRID_REPLICATION_TYPE_UNSPECIFIED => 'HYBRID_REPLICATION_TYPE_UNSPECIFIED', + self::MIGRATION => 'MIGRATION', + self::CONTINUOUS_REPLICATION => 'CONTINUOUS_REPLICATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HybridReplicationType::class, \Google\Cloud\NetApp\V1\Replication_HybridReplicationType::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php new file mode 100644 index 000000000000..1243ed864099 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php @@ -0,0 +1,94 @@ +google.cloud.netapp.v1.Replication.MirrorState + */ +class MirrorState +{ + /** + * Unspecified MirrorState + * + * Generated from protobuf enum MIRROR_STATE_UNSPECIFIED = 0; + */ + const MIRROR_STATE_UNSPECIFIED = 0; + /** + * Destination volume is being prepared. + * + * Generated from protobuf enum PREPARING = 1; + */ + const PREPARING = 1; + /** + * Destination volume has been initialized and is ready to receive + * replication transfers. + * + * Generated from protobuf enum MIRRORED = 2; + */ + const MIRRORED = 2; + /** + * Destination volume is not receiving replication transfers. + * + * Generated from protobuf enum STOPPED = 3; + */ + const STOPPED = 3; + /** + * Incremental replication is in progress. + * + * Generated from protobuf enum TRANSFERRING = 4; + */ + const TRANSFERRING = 4; + /** + * Baseline replication is in progress. + * + * Generated from protobuf enum BASELINE_TRANSFERRING = 5; + */ + const BASELINE_TRANSFERRING = 5; + /** + * Replication is aborted. + * + * Generated from protobuf enum ABORTED = 6; + */ + const ABORTED = 6; + + private static $valueToName = [ + self::MIRROR_STATE_UNSPECIFIED => 'MIRROR_STATE_UNSPECIFIED', + self::PREPARING => 'PREPARING', + self::MIRRORED => 'MIRRORED', + self::STOPPED => 'STOPPED', + self::TRANSFERRING => 'TRANSFERRING', + self::BASELINE_TRANSFERRING => 'BASELINE_TRANSFERRING', + self::ABORTED => 'ABORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MirrorState::class, \Google\Cloud\NetApp\V1\Replication_MirrorState::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php new file mode 100644 index 000000000000..ecd795ef02ef --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php @@ -0,0 +1,65 @@ +google.cloud.netapp.v1.Replication.ReplicationRole + */ +class ReplicationRole +{ + /** + * Unspecified replication role + * + * Generated from protobuf enum REPLICATION_ROLE_UNSPECIFIED = 0; + */ + const REPLICATION_ROLE_UNSPECIFIED = 0; + /** + * Indicates Source volume. + * + * Generated from protobuf enum SOURCE = 1; + */ + const SOURCE = 1; + /** + * Indicates Destination volume. + * + * Generated from protobuf enum DESTINATION = 2; + */ + const DESTINATION = 2; + + private static $valueToName = [ + self::REPLICATION_ROLE_UNSPECIFIED => 'REPLICATION_ROLE_UNSPECIFIED', + self::SOURCE => 'SOURCE', + self::DESTINATION => 'DESTINATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReplicationRole::class, \Google\Cloud\NetApp\V1\Replication_ReplicationRole::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php new file mode 100644 index 000000000000..1846795c7b34 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php @@ -0,0 +1,73 @@ +google.cloud.netapp.v1.Replication.ReplicationSchedule + */ +class ReplicationSchedule +{ + /** + * Unspecified ReplicationSchedule + * + * Generated from protobuf enum REPLICATION_SCHEDULE_UNSPECIFIED = 0; + */ + const REPLICATION_SCHEDULE_UNSPECIFIED = 0; + /** + * Replication happens once every 10 minutes. + * + * Generated from protobuf enum EVERY_10_MINUTES = 1; + */ + const EVERY_10_MINUTES = 1; + /** + * Replication happens once every hour. + * + * Generated from protobuf enum HOURLY = 2; + */ + const HOURLY = 2; + /** + * Replication happens once every day. + * + * Generated from protobuf enum DAILY = 3; + */ + const DAILY = 3; + + private static $valueToName = [ + self::REPLICATION_SCHEDULE_UNSPECIFIED => 'REPLICATION_SCHEDULE_UNSPECIFIED', + self::EVERY_10_MINUTES => 'EVERY_10_MINUTES', + self::HOURLY => 'HOURLY', + self::DAILY => 'DAILY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReplicationSchedule::class, \Google\Cloud\NetApp\V1\Replication_ReplicationSchedule::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php new file mode 100644 index 000000000000..a83367709442 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php @@ -0,0 +1,100 @@ +google.cloud.netapp.v1.Replication.State + */ +class State +{ + /** + * Unspecified replication State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Replication is creating. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Replication is ready. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Replication is updating. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Replication is deleting. + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + /** + * Replication is in error state. + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + /** + * Replication is waiting for cluster peering to be established. + * + * Generated from protobuf enum PENDING_CLUSTER_PEERING = 8; + */ + const PENDING_CLUSTER_PEERING = 8; + /** + * Replication is waiting for SVM peering to be established. + * + * Generated from protobuf enum PENDING_SVM_PEERING = 9; + */ + const PENDING_SVM_PEERING = 9; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::PENDING_CLUSTER_PEERING => 'PENDING_CLUSTER_PEERING', + self::PENDING_SVM_PEERING => 'PENDING_SVM_PEERING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\Replication_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php new file mode 100644 index 000000000000..4e7706a812ae --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php @@ -0,0 +1,120 @@ +google.cloud.netapp.v1.RestoreParameters + */ +class RestoreParameters extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_snapshot + * Full name of the snapshot resource. + * Format: + * projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + * @type string $source_backup + * Full name of the backup resource. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Full name of the snapshot resource. + * Format: + * projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + * + * Generated from protobuf field string source_snapshot = 1; + * @return string + */ + public function getSourceSnapshot() + { + return $this->readOneof(1); + } + + public function hasSourceSnapshot() + { + return $this->hasOneof(1); + } + + /** + * Full name of the snapshot resource. + * Format: + * projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + * + * Generated from protobuf field string source_snapshot = 1; + * @param string $var + * @return $this + */ + public function setSourceSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Full name of the backup resource. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} + * + * Generated from protobuf field string source_backup = 2; + * @return string + */ + public function getSourceBackup() + { + return $this->readOneof(2); + } + + public function hasSourceBackup() + { + return $this->hasOneof(2); + } + + /** + * Full name of the backup resource. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} + * + * Generated from protobuf field string source_backup = 2; + * @param string $var + * @return $this + */ + public function setSourceBackup($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php new file mode 100644 index 000000000000..7c9890392919 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php @@ -0,0 +1,54 @@ +google.cloud.netapp.v1.RestrictedAction + */ +class RestrictedAction +{ + /** + * Unspecified restricted action + * + * Generated from protobuf enum RESTRICTED_ACTION_UNSPECIFIED = 0; + */ + const RESTRICTED_ACTION_UNSPECIFIED = 0; + /** + * Prevent volume from being deleted when mounted. + * + * Generated from protobuf enum DELETE = 1; + */ + const DELETE = 1; + + private static $valueToName = [ + self::RESTRICTED_ACTION_UNSPECIFIED => 'RESTRICTED_ACTION_UNSPECIFIED', + self::DELETE => 'DELETE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php new file mode 100644 index 000000000000..2217e1e454f9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php @@ -0,0 +1,71 @@ +google.cloud.netapp.v1.ResumeReplicationRequest + */ +class ResumeReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php new file mode 100644 index 000000000000..6f01e9c79792 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php @@ -0,0 +1,72 @@ +google.cloud.netapp.v1.ReverseReplicationDirectionRequest + */ +class ReverseReplicationDirectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php new file mode 100644 index 000000000000..b767dafea3eb --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php @@ -0,0 +1,113 @@ +google.cloud.netapp.v1.RevertVolumeRequest + */ +class RevertVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + * + * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + * @type string $snapshot_id + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + * + * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSnapshotId() + { + return $this->snapshot_id; + } + + /** + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + * + * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSnapshotId($var) + { + GPBUtil::checkString($var, True); + $this->snapshot_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php new file mode 100644 index 000000000000..4f42ef7caabb --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php @@ -0,0 +1,111 @@ +google.cloud.netapp.v1.SMBSettings + */ +class SMBSettings +{ + /** + * Unspecified default option + * + * Generated from protobuf enum SMB_SETTINGS_UNSPECIFIED = 0; + */ + const SMB_SETTINGS_UNSPECIFIED = 0; + /** + * SMB setting encrypt data + * + * Generated from protobuf enum ENCRYPT_DATA = 1; + */ + const ENCRYPT_DATA = 1; + /** + * SMB setting browsable + * + * Generated from protobuf enum BROWSABLE = 2; + */ + const BROWSABLE = 2; + /** + * SMB setting notify change + * + * Generated from protobuf enum CHANGE_NOTIFY = 3; + */ + const CHANGE_NOTIFY = 3; + /** + * SMB setting not to notify change + * + * Generated from protobuf enum NON_BROWSABLE = 4; + */ + const NON_BROWSABLE = 4; + /** + * SMB setting oplocks + * + * Generated from protobuf enum OPLOCKS = 5; + */ + const OPLOCKS = 5; + /** + * SMB setting to show snapshots + * + * Generated from protobuf enum SHOW_SNAPSHOT = 6; + */ + const SHOW_SNAPSHOT = 6; + /** + * SMB setting to show previous versions + * + * Generated from protobuf enum SHOW_PREVIOUS_VERSIONS = 7; + */ + const SHOW_PREVIOUS_VERSIONS = 7; + /** + * SMB setting to access volume based on enumerartion + * + * Generated from protobuf enum ACCESS_BASED_ENUMERATION = 8; + */ + const ACCESS_BASED_ENUMERATION = 8; + /** + * Continuously available enumeration + * + * Generated from protobuf enum CONTINUOUSLY_AVAILABLE = 9; + */ + const CONTINUOUSLY_AVAILABLE = 9; + + private static $valueToName = [ + self::SMB_SETTINGS_UNSPECIFIED => 'SMB_SETTINGS_UNSPECIFIED', + self::ENCRYPT_DATA => 'ENCRYPT_DATA', + self::BROWSABLE => 'BROWSABLE', + self::CHANGE_NOTIFY => 'CHANGE_NOTIFY', + self::NON_BROWSABLE => 'NON_BROWSABLE', + self::OPLOCKS => 'OPLOCKS', + self::SHOW_SNAPSHOT => 'SHOW_SNAPSHOT', + self::SHOW_PREVIOUS_VERSIONS => 'SHOW_PREVIOUS_VERSIONS', + self::ACCESS_BASED_ENUMERATION => 'ACCESS_BASED_ENUMERATION', + self::CONTINUOUSLY_AVAILABLE => 'CONTINUOUSLY_AVAILABLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php new file mode 100644 index 000000000000..4fbb24d18d97 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php @@ -0,0 +1,61 @@ +google.cloud.netapp.v1.SecurityStyle + */ +class SecurityStyle +{ + /** + * SecurityStyle is unspecified + * + * Generated from protobuf enum SECURITY_STYLE_UNSPECIFIED = 0; + */ + const SECURITY_STYLE_UNSPECIFIED = 0; + /** + * SecurityStyle uses NTFS + * + * Generated from protobuf enum NTFS = 1; + */ + const NTFS = 1; + /** + * SecurityStyle uses UNIX + * + * Generated from protobuf enum UNIX = 2; + */ + const UNIX = 2; + + private static $valueToName = [ + self::SECURITY_STYLE_UNSPECIFIED => 'SECURITY_STYLE_UNSPECIFIED', + self::NTFS => 'NTFS', + self::UNIX => 'UNIX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php new file mode 100644 index 000000000000..75c2df85fcfd --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php @@ -0,0 +1,75 @@ +google.cloud.netapp.v1.ServiceLevel + */ +class ServiceLevel +{ + /** + * Unspecified service level. + * + * Generated from protobuf enum SERVICE_LEVEL_UNSPECIFIED = 0; + */ + const SERVICE_LEVEL_UNSPECIFIED = 0; + /** + * Premium service level. + * + * Generated from protobuf enum PREMIUM = 1; + */ + const PREMIUM = 1; + /** + * Extreme service level. + * + * Generated from protobuf enum EXTREME = 2; + */ + const EXTREME = 2; + /** + * Standard service level. + * + * Generated from protobuf enum STANDARD = 3; + */ + const STANDARD = 3; + /** + * Flex service level. + * + * Generated from protobuf enum FLEX = 4; + */ + const FLEX = 4; + + private static $valueToName = [ + self::SERVICE_LEVEL_UNSPECIFIED => 'SERVICE_LEVEL_UNSPECIFIED', + self::PREMIUM => 'PREMIUM', + self::EXTREME => 'EXTREME', + self::STANDARD => 'STANDARD', + self::FLEX => 'FLEX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php new file mode 100644 index 000000000000..6008af6ff18d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php @@ -0,0 +1,577 @@ +google.cloud.netapp.v1.SimpleExportPolicyRule + */ +class SimpleExportPolicyRule extends \Google\Protobuf\Internal\Message +{ + /** + * Comma separated list of allowed clients IP addresses + * + * Generated from protobuf field optional string allowed_clients = 1; + */ + protected $allowed_clients = null; + /** + * Whether Unix root access will be granted. + * + * Generated from protobuf field optional string has_root_access = 2; + */ + protected $has_root_access = null; + /** + * Access type (ReadWrite, ReadOnly, None) + * + * Generated from protobuf field optional .google.cloud.netapp.v1.AccessType access_type = 3; + */ + protected $access_type = null; + /** + * NFS V3 protocol. + * + * Generated from protobuf field optional bool nfsv3 = 4; + */ + protected $nfsv3 = null; + /** + * NFS V4 protocol. + * + * Generated from protobuf field optional bool nfsv4 = 5; + */ + protected $nfsv4 = null; + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'authentication' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5_read_only = 6; + */ + protected $kerberos_5_read_only = null; + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'authentication' kerberos security mode. The + * 'kerberos5ReadOnly' value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5_read_write = 7; + */ + protected $kerberos_5_read_write = null; + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'integrity' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5i_read_only = 8; + */ + protected $kerberos_5i_read_only = null; + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5i_read_write = 9; + */ + protected $kerberos_5i_read_write = null; + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'privacy' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5p_read_only = 10; + */ + protected $kerberos_5p_read_only = null; + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5p_read_write = 11; + */ + protected $kerberos_5p_read_write = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $allowed_clients + * Comma separated list of allowed clients IP addresses + * @type string $has_root_access + * Whether Unix root access will be granted. + * @type int $access_type + * Access type (ReadWrite, ReadOnly, None) + * @type bool $nfsv3 + * NFS V3 protocol. + * @type bool $nfsv4 + * NFS V4 protocol. + * @type bool $kerberos_5_read_only + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'authentication' kerberos security mode. + * @type bool $kerberos_5_read_write + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'authentication' kerberos security mode. The + * 'kerberos5ReadOnly' value be ignored if this is enabled. + * @type bool $kerberos_5i_read_only + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'integrity' kerberos security mode. + * @type bool $kerberos_5i_read_write + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + * value be ignored if this is enabled. + * @type bool $kerberos_5p_read_only + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'privacy' kerberos security mode. + * @type bool $kerberos_5p_read_write + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + * value be ignored if this is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Comma separated list of allowed clients IP addresses + * + * Generated from protobuf field optional string allowed_clients = 1; + * @return string + */ + public function getAllowedClients() + { + return isset($this->allowed_clients) ? $this->allowed_clients : ''; + } + + public function hasAllowedClients() + { + return isset($this->allowed_clients); + } + + public function clearAllowedClients() + { + unset($this->allowed_clients); + } + + /** + * Comma separated list of allowed clients IP addresses + * + * Generated from protobuf field optional string allowed_clients = 1; + * @param string $var + * @return $this + */ + public function setAllowedClients($var) + { + GPBUtil::checkString($var, True); + $this->allowed_clients = $var; + + return $this; + } + + /** + * Whether Unix root access will be granted. + * + * Generated from protobuf field optional string has_root_access = 2; + * @return string + */ + public function getHasRootAccess() + { + return isset($this->has_root_access) ? $this->has_root_access : ''; + } + + public function hasHasRootAccess() + { + return isset($this->has_root_access); + } + + public function clearHasRootAccess() + { + unset($this->has_root_access); + } + + /** + * Whether Unix root access will be granted. + * + * Generated from protobuf field optional string has_root_access = 2; + * @param string $var + * @return $this + */ + public function setHasRootAccess($var) + { + GPBUtil::checkString($var, True); + $this->has_root_access = $var; + + return $this; + } + + /** + * Access type (ReadWrite, ReadOnly, None) + * + * Generated from protobuf field optional .google.cloud.netapp.v1.AccessType access_type = 3; + * @return int + */ + public function getAccessType() + { + return isset($this->access_type) ? $this->access_type : 0; + } + + public function hasAccessType() + { + return isset($this->access_type); + } + + public function clearAccessType() + { + unset($this->access_type); + } + + /** + * Access type (ReadWrite, ReadOnly, None) + * + * Generated from protobuf field optional .google.cloud.netapp.v1.AccessType access_type = 3; + * @param int $var + * @return $this + */ + public function setAccessType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\AccessType::class); + $this->access_type = $var; + + return $this; + } + + /** + * NFS V3 protocol. + * + * Generated from protobuf field optional bool nfsv3 = 4; + * @return bool + */ + public function getNfsv3() + { + return isset($this->nfsv3) ? $this->nfsv3 : false; + } + + public function hasNfsv3() + { + return isset($this->nfsv3); + } + + public function clearNfsv3() + { + unset($this->nfsv3); + } + + /** + * NFS V3 protocol. + * + * Generated from protobuf field optional bool nfsv3 = 4; + * @param bool $var + * @return $this + */ + public function setNfsv3($var) + { + GPBUtil::checkBool($var); + $this->nfsv3 = $var; + + return $this; + } + + /** + * NFS V4 protocol. + * + * Generated from protobuf field optional bool nfsv4 = 5; + * @return bool + */ + public function getNfsv4() + { + return isset($this->nfsv4) ? $this->nfsv4 : false; + } + + public function hasNfsv4() + { + return isset($this->nfsv4); + } + + public function clearNfsv4() + { + unset($this->nfsv4); + } + + /** + * NFS V4 protocol. + * + * Generated from protobuf field optional bool nfsv4 = 5; + * @param bool $var + * @return $this + */ + public function setNfsv4($var) + { + GPBUtil::checkBool($var); + $this->nfsv4 = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'authentication' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5_read_only = 6; + * @return bool + */ + public function getKerberos5ReadOnly() + { + return isset($this->kerberos_5_read_only) ? $this->kerberos_5_read_only : false; + } + + public function hasKerberos5ReadOnly() + { + return isset($this->kerberos_5_read_only); + } + + public function clearKerberos5ReadOnly() + { + unset($this->kerberos_5_read_only); + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'authentication' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5_read_only = 6; + * @param bool $var + * @return $this + */ + public function setKerberos5ReadOnly($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5_read_only = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'authentication' kerberos security mode. The + * 'kerberos5ReadOnly' value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5_read_write = 7; + * @return bool + */ + public function getKerberos5ReadWrite() + { + return isset($this->kerberos_5_read_write) ? $this->kerberos_5_read_write : false; + } + + public function hasKerberos5ReadWrite() + { + return isset($this->kerberos_5_read_write); + } + + public function clearKerberos5ReadWrite() + { + unset($this->kerberos_5_read_write); + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'authentication' kerberos security mode. The + * 'kerberos5ReadOnly' value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5_read_write = 7; + * @param bool $var + * @return $this + */ + public function setKerberos5ReadWrite($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5_read_write = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'integrity' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5i_read_only = 8; + * @return bool + */ + public function getKerberos5IReadOnly() + { + return isset($this->kerberos_5i_read_only) ? $this->kerberos_5i_read_only : false; + } + + public function hasKerberos5IReadOnly() + { + return isset($this->kerberos_5i_read_only); + } + + public function clearKerberos5IReadOnly() + { + unset($this->kerberos_5i_read_only); + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'integrity' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5i_read_only = 8; + * @param bool $var + * @return $this + */ + public function setKerberos5IReadOnly($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5i_read_only = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5i_read_write = 9; + * @return bool + */ + public function getKerberos5IReadWrite() + { + return isset($this->kerberos_5i_read_write) ? $this->kerberos_5i_read_write : false; + } + + public function hasKerberos5IReadWrite() + { + return isset($this->kerberos_5i_read_write); + } + + public function clearKerberos5IReadWrite() + { + unset($this->kerberos_5i_read_write); + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5i_read_write = 9; + * @param bool $var + * @return $this + */ + public function setKerberos5IReadWrite($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5i_read_write = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'privacy' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5p_read_only = 10; + * @return bool + */ + public function getKerberos5PReadOnly() + { + return isset($this->kerberos_5p_read_only) ? $this->kerberos_5p_read_only : false; + } + + public function hasKerberos5PReadOnly() + { + return isset($this->kerberos_5p_read_only); + } + + public function clearKerberos5PReadOnly() + { + unset($this->kerberos_5p_read_only); + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'privacy' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5p_read_only = 10; + * @param bool $var + * @return $this + */ + public function setKerberos5PReadOnly($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5p_read_only = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5p_read_write = 11; + * @return bool + */ + public function getKerberos5PReadWrite() + { + return isset($this->kerberos_5p_read_write) ? $this->kerberos_5p_read_write : false; + } + + public function hasKerberos5PReadWrite() + { + return isset($this->kerberos_5p_read_write); + } + + public function clearKerberos5PReadWrite() + { + unset($this->kerberos_5p_read_write); + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5p_read_write = 11; + * @param bool $var + * @return $this + */ + public function setKerberos5PReadWrite($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5p_read_write = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php new file mode 100644 index 000000000000..bf48e9046ed6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php @@ -0,0 +1,293 @@ +google.cloud.netapp.v1.Snapshot + */ +class Snapshot extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the snapshot. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The snapshot state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * A description of the snapshot with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * Output only. Current storage usage for the snapshot in bytes. + * + * Generated from protobuf field double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $used_bytes = 0.0; + /** + * Output only. The time when the snapshot was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 7; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the snapshot. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + * @type int $state + * Output only. The snapshot state. + * @type string $state_details + * Output only. State details of the storage pool + * @type string $description + * A description of the snapshot with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * @type float $used_bytes + * Output only. Current storage usage for the snapshot in bytes. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the snapshot was created. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the snapshot. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the snapshot. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The snapshot state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The snapshot state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Snapshot\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * A description of the snapshot with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description of the snapshot with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Current storage usage for the snapshot in bytes. + * + * Generated from protobuf field double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getUsedBytes() + { + return $this->used_bytes; + } + + /** + * Output only. Current storage usage for the snapshot in bytes. + * + * Generated from protobuf field double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setUsedBytes($var) + { + GPBUtil::checkDouble($var); + $this->used_bytes = $var; + + return $this; + } + + /** + * Output only. The time when the snapshot was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the snapshot was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php new file mode 100644 index 000000000000..e23fe61b5729 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php @@ -0,0 +1,92 @@ +google.cloud.netapp.v1.Snapshot.State + */ +class State +{ + /** + * Unspecified Snapshot State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Snapshot State is Ready + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * Snapshot State is Creating + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Snapshot State is Deleting + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Snapshot State is Updating + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * Snapshot State is Disabled + * + * Generated from protobuf enum DISABLED = 5; + */ + const DISABLED = 5; + /** + * Snapshot State is Error + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::DISABLED => 'DISABLED', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\Snapshot_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php new file mode 100644 index 000000000000..bb19264c49e5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php @@ -0,0 +1,257 @@ +google.cloud.netapp.v1.SnapshotPolicy + */ +class SnapshotPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * If enabled, make snapshots automatically according to the schedules. + * Default is false. + * + * Generated from protobuf field optional bool enabled = 1; + */ + protected $enabled = null; + /** + * Hourly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; + */ + protected $hourly_schedule = null; + /** + * Daily schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; + */ + protected $daily_schedule = null; + /** + * Weekly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; + */ + protected $weekly_schedule = null; + /** + * Monthly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; + */ + protected $monthly_schedule = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * If enabled, make snapshots automatically according to the schedules. + * Default is false. + * @type \Google\Cloud\NetApp\V1\HourlySchedule $hourly_schedule + * Hourly schedule policy. + * @type \Google\Cloud\NetApp\V1\DailySchedule $daily_schedule + * Daily schedule policy. + * @type \Google\Cloud\NetApp\V1\WeeklySchedule $weekly_schedule + * Weekly schedule policy. + * @type \Google\Cloud\NetApp\V1\MonthlySchedule $monthly_schedule + * Monthly schedule policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * If enabled, make snapshots automatically according to the schedules. + * Default is false. + * + * Generated from protobuf field optional bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return isset($this->enabled) ? $this->enabled : false; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * If enabled, make snapshots automatically according to the schedules. + * Default is false. + * + * Generated from protobuf field optional bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Hourly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; + * @return \Google\Cloud\NetApp\V1\HourlySchedule|null + */ + public function getHourlySchedule() + { + return $this->hourly_schedule; + } + + public function hasHourlySchedule() + { + return isset($this->hourly_schedule); + } + + public function clearHourlySchedule() + { + unset($this->hourly_schedule); + } + + /** + * Hourly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; + * @param \Google\Cloud\NetApp\V1\HourlySchedule $var + * @return $this + */ + public function setHourlySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\HourlySchedule::class); + $this->hourly_schedule = $var; + + return $this; + } + + /** + * Daily schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; + * @return \Google\Cloud\NetApp\V1\DailySchedule|null + */ + public function getDailySchedule() + { + return $this->daily_schedule; + } + + public function hasDailySchedule() + { + return isset($this->daily_schedule); + } + + public function clearDailySchedule() + { + unset($this->daily_schedule); + } + + /** + * Daily schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; + * @param \Google\Cloud\NetApp\V1\DailySchedule $var + * @return $this + */ + public function setDailySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\DailySchedule::class); + $this->daily_schedule = $var; + + return $this; + } + + /** + * Weekly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; + * @return \Google\Cloud\NetApp\V1\WeeklySchedule|null + */ + public function getWeeklySchedule() + { + return $this->weekly_schedule; + } + + public function hasWeeklySchedule() + { + return isset($this->weekly_schedule); + } + + public function clearWeeklySchedule() + { + unset($this->weekly_schedule); + } + + /** + * Weekly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; + * @param \Google\Cloud\NetApp\V1\WeeklySchedule $var + * @return $this + */ + public function setWeeklySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\WeeklySchedule::class); + $this->weekly_schedule = $var; + + return $this; + } + + /** + * Monthly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; + * @return \Google\Cloud\NetApp\V1\MonthlySchedule|null + */ + public function getMonthlySchedule() + { + return $this->monthly_schedule; + } + + public function hasMonthlySchedule() + { + return isset($this->monthly_schedule); + } + + public function clearMonthlySchedule() + { + unset($this->monthly_schedule); + } + + /** + * Monthly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; + * @param \Google\Cloud\NetApp\V1\MonthlySchedule $var + * @return $this + */ + public function setMonthlySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\MonthlySchedule::class); + $this->monthly_schedule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php new file mode 100644 index 000000000000..5b666e6fb64f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php @@ -0,0 +1,125 @@ +google.cloud.netapp.v1.StopReplicationRequest + */ +class StopReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @type bool $force + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php new file mode 100644 index 000000000000..6a36d1bae34c --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php @@ -0,0 +1,766 @@ +google.cloud.netapp.v1.StoragePool + */ +class StoragePool extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Service level of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_level = 0; + /** + * Required. Capacity in GIB of the pool + * + * Generated from protobuf field int64 capacity_gib = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $capacity_gib = 0; + /** + * Output only. Allocated size of all volumes in GIB in the storage pool + * + * Generated from protobuf field int64 volume_capacity_gib = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_capacity_gib = 0; + /** + * Output only. Volume count of the storage pool + * + * Generated from protobuf field int32 volume_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_count = 0; + /** + * Output only. State of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * Output only. Create time of the storage pool + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Optional. Description of the storage pool + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Optional. Specifies the Active Directory to be used for creating a SMB + * volume. + * + * Generated from protobuf field string active_directory = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $active_directory = ''; + /** + * Optional. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $kms_config = ''; + /** + * Optional. Flag indicating if the pool is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ldap_enabled = false; + /** + * Optional. This field is not implemented. The values provided in this field + * are ignored. + * + * Generated from protobuf field string psa_range = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $psa_range = ''; + /** + * Output only. Specifies the current pool encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_type = 0; + /** + * Deprecated. Used to allow SO pool to access AD or DNS server from other + * regions. + * + * Generated from protobuf field optional bool global_access_allowed = 17 [deprecated = true]; + * @deprecated + */ + protected $global_access_allowed = null; + /** + * Optional. True if the storage pool supports Auto Tiering enabled volumes. + * Default is false. Auto-tiering can be enabled after storage pool creation + * but it can't be disabled once enabled. + * + * Generated from protobuf field bool allow_auto_tiering = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_auto_tiering = false; + /** + * Optional. Specifies the replica zone for regional storagePool. + * + * Generated from protobuf field string replica_zone = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $replica_zone = ''; + /** + * Optional. Specifies the active zone for regional storagePool. + * + * Generated from protobuf field string zone = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $zone = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the storage pool + * @type int $service_level + * Required. Service level of the storage pool + * @type int|string $capacity_gib + * Required. Capacity in GIB of the pool + * @type int|string $volume_capacity_gib + * Output only. Allocated size of all volumes in GIB in the storage pool + * @type int $volume_count + * Output only. Volume count of the storage pool + * @type int $state + * Output only. State of the storage pool + * @type string $state_details + * Output only. State details of the storage pool + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the storage pool + * @type string $description + * Optional. Description of the storage pool + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs + * @type string $network + * Required. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * @type string $active_directory + * Optional. Specifies the Active Directory to be used for creating a SMB + * volume. + * @type string $kms_config + * Optional. Specifies the KMS config to be used for volume encryption. + * @type bool $ldap_enabled + * Optional. Flag indicating if the pool is NFS LDAP enabled or not. + * @type string $psa_range + * Optional. This field is not implemented. The values provided in this field + * are ignored. + * @type int $encryption_type + * Output only. Specifies the current pool encryption key source. + * @type bool $global_access_allowed + * Deprecated. Used to allow SO pool to access AD or DNS server from other + * regions. + * @type bool $allow_auto_tiering + * Optional. True if the storage pool supports Auto Tiering enabled volumes. + * Default is false. Auto-tiering can be enabled after storage pool creation + * but it can't be disabled once enabled. + * @type string $replica_zone + * Optional. Specifies the replica zone for regional storagePool. + * @type string $zone + * Optional. Specifies the active zone for regional storagePool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Service level of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getServiceLevel() + { + return $this->service_level; + } + + /** + * Required. Service level of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setServiceLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\ServiceLevel::class); + $this->service_level = $var; + + return $this; + } + + /** + * Required. Capacity in GIB of the pool + * + * Generated from protobuf field int64 capacity_gib = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getCapacityGib() + { + return $this->capacity_gib; + } + + /** + * Required. Capacity in GIB of the pool + * + * Generated from protobuf field int64 capacity_gib = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setCapacityGib($var) + { + GPBUtil::checkInt64($var); + $this->capacity_gib = $var; + + return $this; + } + + /** + * Output only. Allocated size of all volumes in GIB in the storage pool + * + * Generated from protobuf field int64 volume_capacity_gib = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getVolumeCapacityGib() + { + return $this->volume_capacity_gib; + } + + /** + * Output only. Allocated size of all volumes in GIB in the storage pool + * + * Generated from protobuf field int64 volume_capacity_gib = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setVolumeCapacityGib($var) + { + GPBUtil::checkInt64($var); + $this->volume_capacity_gib = $var; + + return $this; + } + + /** + * Output only. Volume count of the storage pool + * + * Generated from protobuf field int32 volume_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVolumeCount() + { + return $this->volume_count; + } + + /** + * Output only. Volume count of the storage pool + * + * Generated from protobuf field int32 volume_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVolumeCount($var) + { + GPBUtil::checkInt32($var); + $this->volume_count = $var; + + return $this; + } + + /** + * Output only. State of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\StoragePool\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * Output only. Create time of the storage pool + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the storage pool + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Optional. Description of the storage pool + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the storage pool + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. Specifies the Active Directory to be used for creating a SMB + * volume. + * + * Generated from protobuf field string active_directory = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getActiveDirectory() + { + return $this->active_directory; + } + + /** + * Optional. Specifies the Active Directory to be used for creating a SMB + * volume. + * + * Generated from protobuf field string active_directory = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setActiveDirectory($var) + { + GPBUtil::checkString($var, True); + $this->active_directory = $var; + + return $this; + } + + /** + * Optional. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsConfig() + { + return $this->kms_config; + } + + /** + * Optional. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsConfig($var) + { + GPBUtil::checkString($var, True); + $this->kms_config = $var; + + return $this; + } + + /** + * Optional. Flag indicating if the pool is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getLdapEnabled() + { + return $this->ldap_enabled; + } + + /** + * Optional. Flag indicating if the pool is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setLdapEnabled($var) + { + GPBUtil::checkBool($var); + $this->ldap_enabled = $var; + + return $this; + } + + /** + * Optional. This field is not implemented. The values provided in this field + * are ignored. + * + * Generated from protobuf field string psa_range = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPsaRange() + { + return $this->psa_range; + } + + /** + * Optional. This field is not implemented. The values provided in this field + * are ignored. + * + * Generated from protobuf field string psa_range = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPsaRange($var) + { + GPBUtil::checkString($var, True); + $this->psa_range = $var; + + return $this; + } + + /** + * Output only. Specifies the current pool encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEncryptionType() + { + return $this->encryption_type; + } + + /** + * Output only. Specifies the current pool encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEncryptionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\EncryptionType::class); + $this->encryption_type = $var; + + return $this; + } + + /** + * Deprecated. Used to allow SO pool to access AD or DNS server from other + * regions. + * + * Generated from protobuf field optional bool global_access_allowed = 17 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getGlobalAccessAllowed() + { + @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); + return isset($this->global_access_allowed) ? $this->global_access_allowed : false; + } + + public function hasGlobalAccessAllowed() + { + @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); + return isset($this->global_access_allowed); + } + + public function clearGlobalAccessAllowed() + { + @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); + unset($this->global_access_allowed); + } + + /** + * Deprecated. Used to allow SO pool to access AD or DNS server from other + * regions. + * + * Generated from protobuf field optional bool global_access_allowed = 17 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setGlobalAccessAllowed($var) + { + @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->global_access_allowed = $var; + + return $this; + } + + /** + * Optional. True if the storage pool supports Auto Tiering enabled volumes. + * Default is false. Auto-tiering can be enabled after storage pool creation + * but it can't be disabled once enabled. + * + * Generated from protobuf field bool allow_auto_tiering = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowAutoTiering() + { + return $this->allow_auto_tiering; + } + + /** + * Optional. True if the storage pool supports Auto Tiering enabled volumes. + * Default is false. Auto-tiering can be enabled after storage pool creation + * but it can't be disabled once enabled. + * + * Generated from protobuf field bool allow_auto_tiering = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowAutoTiering($var) + { + GPBUtil::checkBool($var); + $this->allow_auto_tiering = $var; + + return $this; + } + + /** + * Optional. Specifies the replica zone for regional storagePool. + * + * Generated from protobuf field string replica_zone = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReplicaZone() + { + return $this->replica_zone; + } + + /** + * Optional. Specifies the replica zone for regional storagePool. + * + * Generated from protobuf field string replica_zone = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReplicaZone($var) + { + GPBUtil::checkString($var, True); + $this->replica_zone = $var; + + return $this; + } + + /** + * Optional. Specifies the active zone for regional storagePool. + * + * Generated from protobuf field string zone = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Optional. Specifies the active zone for regional storagePool. + * + * Generated from protobuf field string zone = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php new file mode 100644 index 000000000000..54f30aa39562 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php @@ -0,0 +1,99 @@ +google.cloud.netapp.v1.StoragePool.State + */ +class State +{ + /** + * Unspecified Storage Pool State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Storage Pool State is Ready + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * Storage Pool State is Creating + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Storage Pool State is Deleting + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Storage Pool State is Updating + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * Storage Pool State is Restoring + * + * Generated from protobuf enum RESTORING = 5; + */ + const RESTORING = 5; + /** + * Storage Pool State is Disabled + * + * Generated from protobuf enum DISABLED = 6; + */ + const DISABLED = 6; + /** + * Storage Pool State is Error + * + * Generated from protobuf enum ERROR = 7; + */ + const ERROR = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::RESTORING => 'RESTORING', + self::DISABLED => 'DISABLED', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\StoragePool_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php new file mode 100644 index 000000000000..bb834b099c23 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php @@ -0,0 +1,68 @@ +google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + */ +class SwitchActiveReplicaZoneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the storage pool + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php new file mode 100644 index 000000000000..c76ab8329d9d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php @@ -0,0 +1,71 @@ +google.cloud.netapp.v1.SyncReplicationRequest + */ +class SyncReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php new file mode 100644 index 000000000000..26a4a16e0cba --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php @@ -0,0 +1,129 @@ +google.cloud.netapp.v1.TieringPolicy + */ +class TieringPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Flag indicating if the volume has tiering policy enable/pause. + * Default is PAUSED. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy.TierAction tier_action = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tier_action = null; + /** + * Optional. 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. + * + * Generated from protobuf field optional int32 cooling_threshold_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cooling_threshold_days = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $tier_action + * Optional. Flag indicating if the volume has tiering policy enable/pause. + * Default is PAUSED. + * @type int $cooling_threshold_days + * Optional. 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Flag indicating if the volume has tiering policy enable/pause. + * Default is PAUSED. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy.TierAction tier_action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTierAction() + { + return isset($this->tier_action) ? $this->tier_action : 0; + } + + public function hasTierAction() + { + return isset($this->tier_action); + } + + public function clearTierAction() + { + unset($this->tier_action); + } + + /** + * Optional. Flag indicating if the volume has tiering policy enable/pause. + * Default is PAUSED. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy.TierAction tier_action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTierAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\TieringPolicy\TierAction::class); + $this->tier_action = $var; + + return $this; + } + + /** + * Optional. 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. + * + * Generated from protobuf field optional int32 cooling_threshold_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCoolingThresholdDays() + { + return isset($this->cooling_threshold_days) ? $this->cooling_threshold_days : 0; + } + + public function hasCoolingThresholdDays() + { + return isset($this->cooling_threshold_days); + } + + public function clearCoolingThresholdDays() + { + unset($this->cooling_threshold_days); + } + + /** + * Optional. 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. + * + * Generated from protobuf field optional int32 cooling_threshold_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCoolingThresholdDays($var) + { + GPBUtil::checkInt32($var); + $this->cooling_threshold_days = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php new file mode 100644 index 000000000000..81a17a01966a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php @@ -0,0 +1,65 @@ +google.cloud.netapp.v1.TieringPolicy.TierAction + */ +class TierAction +{ + /** + * Unspecified. + * + * Generated from protobuf enum TIER_ACTION_UNSPECIFIED = 0; + */ + const TIER_ACTION_UNSPECIFIED = 0; + /** + * When tiering is enabled, new cold data will be tiered. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * When paused, tiering won't be performed on new data. Existing data stays + * tiered until accessed. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + + private static $valueToName = [ + self::TIER_ACTION_UNSPECIFIED => 'TIER_ACTION_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::PAUSED => 'PAUSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TierAction::class, \Google\Cloud\NetApp\V1\TieringPolicy_TierAction::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php new file mode 100644 index 000000000000..4459ecf16afc --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php @@ -0,0 +1,393 @@ +google.cloud.netapp.v1.TransferStats + */ +class TransferStats extends \Google\Protobuf\Internal\Message +{ + /** + * Cumulative bytes trasferred so far for the replication relatinonship. + * + * Generated from protobuf field optional int64 transfer_bytes = 1; + */ + protected $transfer_bytes = null; + /** + * Cumulative time taken across all transfers for the replication + * relationship. + * + * Generated from protobuf field optional .google.protobuf.Duration total_transfer_duration = 2; + */ + protected $total_transfer_duration = null; + /** + * Last transfer size in bytes. + * + * Generated from protobuf field optional int64 last_transfer_bytes = 3; + */ + protected $last_transfer_bytes = null; + /** + * Time taken during last transfer. + * + * Generated from protobuf field optional .google.protobuf.Duration last_transfer_duration = 4; + */ + protected $last_transfer_duration = null; + /** + * Lag duration indicates the duration by which Destination region volume + * content lags behind the primary region volume content. + * + * Generated from protobuf field optional .google.protobuf.Duration lag_duration = 5; + */ + protected $lag_duration = null; + /** + * Time when progress was updated last. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6; + */ + protected $update_time = null; + /** + * Time when last transfer completed. + * + * Generated from protobuf field optional .google.protobuf.Timestamp last_transfer_end_time = 7; + */ + protected $last_transfer_end_time = null; + /** + * A message describing the cause of the last transfer failure. + * + * Generated from protobuf field optional string last_transfer_error = 8; + */ + protected $last_transfer_error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $transfer_bytes + * Cumulative bytes trasferred so far for the replication relatinonship. + * @type \Google\Protobuf\Duration $total_transfer_duration + * Cumulative time taken across all transfers for the replication + * relationship. + * @type int|string $last_transfer_bytes + * Last transfer size in bytes. + * @type \Google\Protobuf\Duration $last_transfer_duration + * Time taken during last transfer. + * @type \Google\Protobuf\Duration $lag_duration + * Lag duration indicates the duration by which Destination region volume + * content lags behind the primary region volume content. + * @type \Google\Protobuf\Timestamp $update_time + * Time when progress was updated last. + * @type \Google\Protobuf\Timestamp $last_transfer_end_time + * Time when last transfer completed. + * @type string $last_transfer_error + * A message describing the cause of the last transfer failure. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Cumulative bytes trasferred so far for the replication relatinonship. + * + * Generated from protobuf field optional int64 transfer_bytes = 1; + * @return int|string + */ + public function getTransferBytes() + { + return isset($this->transfer_bytes) ? $this->transfer_bytes : 0; + } + + public function hasTransferBytes() + { + return isset($this->transfer_bytes); + } + + public function clearTransferBytes() + { + unset($this->transfer_bytes); + } + + /** + * Cumulative bytes trasferred so far for the replication relatinonship. + * + * Generated from protobuf field optional int64 transfer_bytes = 1; + * @param int|string $var + * @return $this + */ + public function setTransferBytes($var) + { + GPBUtil::checkInt64($var); + $this->transfer_bytes = $var; + + return $this; + } + + /** + * Cumulative time taken across all transfers for the replication + * relationship. + * + * Generated from protobuf field optional .google.protobuf.Duration total_transfer_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalTransferDuration() + { + return $this->total_transfer_duration; + } + + public function hasTotalTransferDuration() + { + return isset($this->total_transfer_duration); + } + + public function clearTotalTransferDuration() + { + unset($this->total_transfer_duration); + } + + /** + * Cumulative time taken across all transfers for the replication + * relationship. + * + * Generated from protobuf field optional .google.protobuf.Duration total_transfer_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalTransferDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_transfer_duration = $var; + + return $this; + } + + /** + * Last transfer size in bytes. + * + * Generated from protobuf field optional int64 last_transfer_bytes = 3; + * @return int|string + */ + public function getLastTransferBytes() + { + return isset($this->last_transfer_bytes) ? $this->last_transfer_bytes : 0; + } + + public function hasLastTransferBytes() + { + return isset($this->last_transfer_bytes); + } + + public function clearLastTransferBytes() + { + unset($this->last_transfer_bytes); + } + + /** + * Last transfer size in bytes. + * + * Generated from protobuf field optional int64 last_transfer_bytes = 3; + * @param int|string $var + * @return $this + */ + public function setLastTransferBytes($var) + { + GPBUtil::checkInt64($var); + $this->last_transfer_bytes = $var; + + return $this; + } + + /** + * Time taken during last transfer. + * + * Generated from protobuf field optional .google.protobuf.Duration last_transfer_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getLastTransferDuration() + { + return $this->last_transfer_duration; + } + + public function hasLastTransferDuration() + { + return isset($this->last_transfer_duration); + } + + public function clearLastTransferDuration() + { + unset($this->last_transfer_duration); + } + + /** + * Time taken during last transfer. + * + * Generated from protobuf field optional .google.protobuf.Duration last_transfer_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLastTransferDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->last_transfer_duration = $var; + + return $this; + } + + /** + * Lag duration indicates the duration by which Destination region volume + * content lags behind the primary region volume content. + * + * Generated from protobuf field optional .google.protobuf.Duration lag_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getLagDuration() + { + return $this->lag_duration; + } + + public function hasLagDuration() + { + return isset($this->lag_duration); + } + + public function clearLagDuration() + { + unset($this->lag_duration); + } + + /** + * Lag duration indicates the duration by which Destination region volume + * content lags behind the primary region volume content. + * + * Generated from protobuf field optional .google.protobuf.Duration lag_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLagDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->lag_duration = $var; + + return $this; + } + + /** + * Time when progress was updated last. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Time when progress was updated last. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Time when last transfer completed. + * + * Generated from protobuf field optional .google.protobuf.Timestamp last_transfer_end_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastTransferEndTime() + { + return $this->last_transfer_end_time; + } + + public function hasLastTransferEndTime() + { + return isset($this->last_transfer_end_time); + } + + public function clearLastTransferEndTime() + { + unset($this->last_transfer_end_time); + } + + /** + * Time when last transfer completed. + * + * Generated from protobuf field optional .google.protobuf.Timestamp last_transfer_end_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastTransferEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_transfer_end_time = $var; + + return $this; + } + + /** + * A message describing the cause of the last transfer failure. + * + * Generated from protobuf field optional string last_transfer_error = 8; + * @return string + */ + public function getLastTransferError() + { + return isset($this->last_transfer_error) ? $this->last_transfer_error : ''; + } + + public function hasLastTransferError() + { + return isset($this->last_transfer_error); + } + + public function clearLastTransferError() + { + unset($this->last_transfer_error); + } + + /** + * A message describing the cause of the last transfer failure. + * + * Generated from protobuf field optional string last_transfer_error = 8; + * @param string $var + * @return $this + */ + public function setLastTransferError($var) + { + GPBUtil::checkString($var, True); + $this->last_transfer_error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php new file mode 100644 index 000000000000..aff58d48c9a2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateActiveDirectoryRequest + */ +class UpdateActiveDirectoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $active_directory = null; + + /** + * @param \Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory Required. The volume being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateActiveDirectoryRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setActiveDirectory($activeDirectory) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\ActiveDirectory $active_directory + * Required. The volume being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\ActiveDirectory|null + */ + public function getActiveDirectory() + { + return $this->active_directory; + } + + public function hasActiveDirectory() + { + return isset($this->active_directory); + } + + public function clearActiveDirectory() + { + unset($this->active_directory); + } + + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\ActiveDirectory $var + * @return $this + */ + public function setActiveDirectory($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\ActiveDirectory::class); + $this->active_directory = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php new file mode 100644 index 000000000000..e7e9619f9379 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateBackupPolicyRequest + */ +class UpdateBackupPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The backup policy being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_policy = null; + + /** + * @param \Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy Required. The backup policy being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateBackupPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBackupPolicy($backupPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\BackupPolicy $backup_policy + * Required. The backup policy being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The backup policy being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\BackupPolicy|null + */ + public function getBackupPolicy() + { + return $this->backup_policy; + } + + public function hasBackupPolicy() + { + return isset($this->backup_policy); + } + + public function clearBackupPolicy() + { + unset($this->backup_policy); + } + + /** + * Required. The backup policy being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\BackupPolicy $var + * @return $this + */ + public function setBackupPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupPolicy::class); + $this->backup_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php new file mode 100644 index 000000000000..423245df4e38 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateBackupRequest + */ +class UpdateBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The backup being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup = null; + + /** + * @param \Google\Cloud\NetApp\V1\Backup $backup Required. The backup being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateBackupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\Backup $backup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBackup($backup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\Backup $backup + * Required. The backup being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The backup being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Backup|null + */ + public function getBackup() + { + return $this->backup; + } + + public function hasBackup() + { + return isset($this->backup); + } + + public function clearBackup() + { + unset($this->backup); + } + + /** + * Required. The backup being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Backup $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Backup::class); + $this->backup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php new file mode 100644 index 000000000000..5ae79183eba2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateBackupVaultRequest + */ +class UpdateBackupVaultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The backupVault being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_vault = null; + + /** + * @param \Google\Cloud\NetApp\V1\BackupVault $backupVault Required. The backupVault being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateBackupVaultRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\BackupVault $backupVault, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBackupVault($backupVault) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\BackupVault $backup_vault + * Required. The backupVault being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The backupVault being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\BackupVault|null + */ + public function getBackupVault() + { + return $this->backup_vault; + } + + public function hasBackupVault() + { + return isset($this->backup_vault); + } + + public function clearBackupVault() + { + unset($this->backup_vault); + } + + /** + * Required. The backupVault being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\BackupVault $var + * @return $this + */ + public function setBackupVault($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupVault::class); + $this->backup_vault = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php new file mode 100644 index 000000000000..e7d21cc91040 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateKmsConfigRequest + */ +class UpdateKmsConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The KmsConfig being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_config = null; + + /** + * @param \Google\Cloud\NetApp\V1\KmsConfig $kmsConfig Required. The KmsConfig being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateKmsConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\KmsConfig $kmsConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setKmsConfig($kmsConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\KmsConfig $kms_config + * Required. The KmsConfig being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The KmsConfig being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\KmsConfig|null + */ + public function getKmsConfig() + { + return $this->kms_config; + } + + public function hasKmsConfig() + { + return isset($this->kms_config); + } + + public function clearKmsConfig() + { + unset($this->kms_config); + } + + /** + * Required. The KmsConfig being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\KmsConfig $var + * @return $this + */ + public function setKmsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\KmsConfig::class); + $this->kms_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php new file mode 100644 index 000000000000..74d52ea18a2a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php @@ -0,0 +1,141 @@ +google.cloud.netapp.v1.UpdateReplicationRequest + */ +class UpdateReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $replication = null; + + /** + * @param \Google\Cloud\NetApp\V1\Replication $replication Required. A replication resource + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * @return \Google\Cloud\NetApp\V1\UpdateReplicationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\Replication $replication, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setReplication($replication) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @type \Google\Cloud\NetApp\V1\Replication $replication + * Required. A replication resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Replication|null + */ + public function getReplication() + { + return $this->replication; + } + + public function hasReplication() + { + return isset($this->replication); + } + + public function clearReplication() + { + unset($this->replication); + } + + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Replication $var + * @return $this + */ + public function setReplication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Replication::class); + $this->replication = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php new file mode 100644 index 000000000000..245912940e92 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php @@ -0,0 +1,141 @@ +google.cloud.netapp.v1.UpdateSnapshotRequest + */ +class UpdateSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot = null; + + /** + * @param \Google\Cloud\NetApp\V1\Snapshot $snapshot Required. A snapshot resource + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * @return \Google\Cloud\NetApp\V1\UpdateSnapshotRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\Snapshot $snapshot, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSnapshot($snapshot) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @type \Google\Cloud\NetApp\V1\Snapshot $snapshot + * Required. A snapshot resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Snapshot|null + */ + public function getSnapshot() + { + return $this->snapshot; + } + + public function hasSnapshot() + { + return isset($this->snapshot); + } + + public function clearSnapshot() + { + unset($this->snapshot); + } + + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Snapshot $var + * @return $this + */ + public function setSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Snapshot::class); + $this->snapshot = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php new file mode 100644 index 000000000000..d6194402ffe3 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateStoragePoolRequest + */ +class UpdateStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The pool being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $storage_pool = null; + + /** + * @param \Google\Cloud\NetApp\V1\StoragePool $storagePool Required. The pool being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateStoragePoolRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\StoragePool $storagePool, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setStoragePool($storagePool) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\StoragePool $storage_pool + * Required. The pool being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The pool being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\StoragePool|null + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + public function hasStoragePool() + { + return isset($this->storage_pool); + } + + public function clearStoragePool() + { + unset($this->storage_pool); + } + + /** + * Required. The pool being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\StoragePool $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\StoragePool::class); + $this->storage_pool = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php new file mode 100644 index 000000000000..9ff480418046 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateVolumeRequest + */ +class UpdateVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $volume = null; + + /** + * @param \Google\Cloud\NetApp\V1\Volume $volume Required. The volume being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateVolumeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\Volume $volume, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setVolume($volume) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\Volume $volume + * Required. The volume being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Volume|null + */ + public function getVolume() + { + return $this->volume; + } + + public function hasVolume() + { + return isset($this->volume); + } + + public function clearVolume() + { + unset($this->volume); + } + + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Volume $var + * @return $this + */ + public function setVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Volume::class); + $this->volume = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php new file mode 100644 index 000000000000..cbdbf82d59b6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php @@ -0,0 +1,67 @@ +google.cloud.netapp.v1.VerifyKmsConfigRequest + */ +class VerifyKmsConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the KMS Config to be verified. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the KMS Config to be verified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the KMS Config to be verified. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the KMS Config to be verified. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php new file mode 100644 index 000000000000..317111a10436 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php @@ -0,0 +1,144 @@ +google.cloud.netapp.v1.VerifyKmsConfigResponse + */ +class VerifyKmsConfigResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. If the customer key configured correctly to the encrypt + * volume. + * + * Generated from protobuf field bool healthy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $healthy = false; + /** + * Output only. Error message if config is not healthy. + * + * Generated from protobuf field string health_error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $health_error = ''; + /** + * Output only. Instructions for the customers to provide the access to the + * encryption key. + * + * Generated from protobuf field string instructions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $instructions = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $healthy + * Output only. If the customer key configured correctly to the encrypt + * volume. + * @type string $health_error + * Output only. Error message if config is not healthy. + * @type string $instructions + * Output only. Instructions for the customers to provide the access to the + * encryption key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Output only. If the customer key configured correctly to the encrypt + * volume. + * + * Generated from protobuf field bool healthy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getHealthy() + { + return $this->healthy; + } + + /** + * Output only. If the customer key configured correctly to the encrypt + * volume. + * + * Generated from protobuf field bool healthy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setHealthy($var) + { + GPBUtil::checkBool($var); + $this->healthy = $var; + + return $this; + } + + /** + * Output only. Error message if config is not healthy. + * + * Generated from protobuf field string health_error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHealthError() + { + return $this->health_error; + } + + /** + * Output only. Error message if config is not healthy. + * + * Generated from protobuf field string health_error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHealthError($var) + { + GPBUtil::checkString($var, True); + $this->health_error = $var; + + return $this; + } + + /** + * Output only. Instructions for the customers to provide the access to the + * encryption key. + * + * Generated from protobuf field string instructions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getInstructions() + { + return $this->instructions; + } + + /** + * Output only. Instructions for the customers to provide the access to the + * encryption key. + * + * Generated from protobuf field string instructions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setInstructions($var) + { + GPBUtil::checkString($var, True); + $this->instructions = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php new file mode 100644 index 000000000000..3c33402f966f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php @@ -0,0 +1,1443 @@ +google.cloud.netapp.v1.Volume + */ +class Volume extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. State of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. State details of the volume + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * Output only. Create time of the volume + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Required. Share name of the volume + * + * Generated from protobuf field string share_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $share_name = ''; + /** + * Output only. This field is not implemented. The values provided in this + * field are ignored. + * + * Generated from protobuf field string psa_range = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psa_range = ''; + /** + * Required. StoragePool name of the volume + * + * Generated from protobuf field string storage_pool = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $storage_pool = ''; + /** + * Output only. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. Service level of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_level = 0; + /** + * Required. Capacity in GIB of the volume + * + * Generated from protobuf field int64 capacity_gib = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $capacity_gib = 0; + /** + * Optional. Export policy of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ExportPolicy export_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $export_policy = null; + /** + * Required. Protocols required for the volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Protocols protocols = 12 [(.google.api.field_behavior) = REQUIRED]; + */ + private $protocols; + /** + * Optional. SMB share settings for the volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SMBSettings smb_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $smb_settings; + /** + * Output only. Mount options of this volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.MountOption mount_options = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $mount_options; + /** + * Optional. Default unix style permission (e.g. 777) the mount point will be + * created with. Applicable for NFS protocol types only. + * + * Generated from protobuf field string unix_permissions = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $unix_permissions = ''; + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Description of the volume + * + * Generated from protobuf field string description = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. SnapshotPolicy for a volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.SnapshotPolicy snapshot_policy = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $snapshot_policy = null; + /** + * Optional. Snap_reserve specifies percentage of volume storage reserved for + * snapshot storage. Default is 0 percent. + * + * Generated from protobuf field double snap_reserve = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $snap_reserve = 0.0; + /** + * Optional. Snapshot_directory if enabled (true) the volume will contain a + * read-only .snapshot directory which provides access to each of the volume's + * snapshots. + * + * Generated from protobuf field bool snapshot_directory = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $snapshot_directory = false; + /** + * Output only. Used capacity in GIB of the volume. This is computed + * periodically and it does not represent the realtime usage. + * + * Generated from protobuf field int64 used_gib = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $used_gib = 0; + /** + * Optional. Security Style of the Volume + * + * Generated from protobuf field .google.cloud.netapp.v1.SecurityStyle security_style = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $security_style = 0; + /** + * Optional. Flag indicating if the volume is a kerberos volume or not, export + * policy rules control kerberos security modes (krb5, krb5i, krb5p). + * + * Generated from protobuf field bool kerberos_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kerberos_enabled = false; + /** + * Output only. Flag indicating if the volume is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ldap_enabled = false; + /** + * Output only. Specifies the ActiveDirectory name of a SMB volume. + * + * Generated from protobuf field string active_directory = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $active_directory = ''; + /** + * Optional. Specifies the source of the volume to be created from. + * + * Generated from protobuf field .google.cloud.netapp.v1.RestoreParameters restore_parameters = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $restore_parameters = null; + /** + * Output only. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 27 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $kms_config = ''; + /** + * Output only. Specified the current volume encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_type = 0; + /** + * Output only. Indicates whether the volume is part of a replication + * relationship. + * + * Generated from protobuf field bool has_replication = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $has_replication = false; + /** + * BackupConfig of the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + protected $backup_config = null; + /** + * Optional. List of actions that are restricted on this volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.RestrictedAction restricted_actions = 31 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $restricted_actions; + /** + * Optional. Flag indicating if the volume will be a large capacity volume or + * a regular volume. + * + * Generated from protobuf field bool large_capacity = 32 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $large_capacity = false; + /** + * Optional. Flag indicating if the volume will have an IP address per node + * for volumes supporting multiple IP endpoints. Only the volume with + * large_capacity will be allowed to have multiple endpoints. + * + * Generated from protobuf field bool multiple_endpoints = 33 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $multiple_endpoints = false; + /** + * Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 34; + */ + protected $tiering_policy = null; + /** + * Output only. Specifies the replica zone for regional volume. + * + * Generated from protobuf field string replica_zone = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $replica_zone = ''; + /** + * Output only. Specifies the active zone for regional volume. + * + * Generated from protobuf field string zone = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $zone = ''; + /** + * Output only. Size of the volume cold tier data in GiB. + * + * Generated from protobuf field int64 cold_tier_size_gib = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cold_tier_size_gib = 0; + /** + * Optional. The Hybrid Replication parameters for the volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridReplicationParameters hybrid_replication_parameters = 40 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $hybrid_replication_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the volume + * @type int $state + * Output only. State of the volume + * @type string $state_details + * Output only. State details of the volume + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the volume + * @type string $share_name + * Required. Share name of the volume + * @type string $psa_range + * Output only. This field is not implemented. The values provided in this + * field are ignored. + * @type string $storage_pool + * Required. StoragePool name of the volume + * @type string $network + * Output only. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * @type int $service_level + * Output only. Service level of the volume + * @type int|string $capacity_gib + * Required. Capacity in GIB of the volume + * @type \Google\Cloud\NetApp\V1\ExportPolicy $export_policy + * Optional. Export policy of the volume + * @type array|\Google\Protobuf\Internal\RepeatedField $protocols + * Required. Protocols required for the volume + * @type array|\Google\Protobuf\Internal\RepeatedField $smb_settings + * Optional. SMB share settings for the volume. + * @type array<\Google\Cloud\NetApp\V1\MountOption>|\Google\Protobuf\Internal\RepeatedField $mount_options + * Output only. Mount options of this volume + * @type string $unix_permissions + * Optional. Default unix style permission (e.g. 777) the mount point will be + * created with. Applicable for NFS protocol types only. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs + * @type string $description + * Optional. Description of the volume + * @type \Google\Cloud\NetApp\V1\SnapshotPolicy $snapshot_policy + * Optional. SnapshotPolicy for a volume. + * @type float $snap_reserve + * Optional. Snap_reserve specifies percentage of volume storage reserved for + * snapshot storage. Default is 0 percent. + * @type bool $snapshot_directory + * Optional. Snapshot_directory if enabled (true) the volume will contain a + * read-only .snapshot directory which provides access to each of the volume's + * snapshots. + * @type int|string $used_gib + * Output only. Used capacity in GIB of the volume. This is computed + * periodically and it does not represent the realtime usage. + * @type int $security_style + * Optional. Security Style of the Volume + * @type bool $kerberos_enabled + * Optional. Flag indicating if the volume is a kerberos volume or not, export + * policy rules control kerberos security modes (krb5, krb5i, krb5p). + * @type bool $ldap_enabled + * Output only. Flag indicating if the volume is NFS LDAP enabled or not. + * @type string $active_directory + * Output only. Specifies the ActiveDirectory name of a SMB volume. + * @type \Google\Cloud\NetApp\V1\RestoreParameters $restore_parameters + * Optional. Specifies the source of the volume to be created from. + * @type string $kms_config + * Output only. Specifies the KMS config to be used for volume encryption. + * @type int $encryption_type + * Output only. Specified the current volume encryption key source. + * @type bool $has_replication + * Output only. Indicates whether the volume is part of a replication + * relationship. + * @type \Google\Cloud\NetApp\V1\BackupConfig $backup_config + * BackupConfig of the volume. + * @type array|\Google\Protobuf\Internal\RepeatedField $restricted_actions + * Optional. List of actions that are restricted on this volume. + * @type bool $large_capacity + * Optional. Flag indicating if the volume will be a large capacity volume or + * a regular volume. + * @type bool $multiple_endpoints + * Optional. Flag indicating if the volume will have an IP address per node + * for volumes supporting multiple IP endpoints. Only the volume with + * large_capacity will be allowed to have multiple endpoints. + * @type \Google\Cloud\NetApp\V1\TieringPolicy $tiering_policy + * Tiering policy for the volume. + * @type string $replica_zone + * Output only. Specifies the replica zone for regional volume. + * @type string $zone + * Output only. Specifies the active zone for regional volume. + * @type int|string $cold_tier_size_gib + * Output only. Size of the volume cold tier data in GiB. + * @type \Google\Cloud\NetApp\V1\HybridReplicationParameters $hybrid_replication_parameters + * Optional. The Hybrid Replication parameters for the volume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. State of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Volume\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. State details of the volume + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. State details of the volume + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * Output only. Create time of the volume + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the volume + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Required. Share name of the volume + * + * Generated from protobuf field string share_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getShareName() + { + return $this->share_name; + } + + /** + * Required. Share name of the volume + * + * Generated from protobuf field string share_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setShareName($var) + { + GPBUtil::checkString($var, True); + $this->share_name = $var; + + return $this; + } + + /** + * Output only. This field is not implemented. The values provided in this + * field are ignored. + * + * Generated from protobuf field string psa_range = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPsaRange() + { + return $this->psa_range; + } + + /** + * Output only. This field is not implemented. The values provided in this + * field are ignored. + * + * Generated from protobuf field string psa_range = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPsaRange($var) + { + GPBUtil::checkString($var, True); + $this->psa_range = $var; + + return $this; + } + + /** + * Required. StoragePool name of the volume + * + * Generated from protobuf field string storage_pool = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + /** + * Required. StoragePool name of the volume + * + * Generated from protobuf field string storage_pool = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool = $var; + + return $this; + } + + /** + * Output only. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Output only. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. Service level of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getServiceLevel() + { + return $this->service_level; + } + + /** + * Output only. Service level of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setServiceLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\ServiceLevel::class); + $this->service_level = $var; + + return $this; + } + + /** + * Required. Capacity in GIB of the volume + * + * Generated from protobuf field int64 capacity_gib = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getCapacityGib() + { + return $this->capacity_gib; + } + + /** + * Required. Capacity in GIB of the volume + * + * Generated from protobuf field int64 capacity_gib = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setCapacityGib($var) + { + GPBUtil::checkInt64($var); + $this->capacity_gib = $var; + + return $this; + } + + /** + * Optional. Export policy of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ExportPolicy export_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetApp\V1\ExportPolicy|null + */ + public function getExportPolicy() + { + return $this->export_policy; + } + + public function hasExportPolicy() + { + return isset($this->export_policy); + } + + public function clearExportPolicy() + { + unset($this->export_policy); + } + + /** + * Optional. Export policy of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ExportPolicy export_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetApp\V1\ExportPolicy $var + * @return $this + */ + public function setExportPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\ExportPolicy::class); + $this->export_policy = $var; + + return $this; + } + + /** + * Required. Protocols required for the volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Protocols protocols = 12 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProtocols() + { + return $this->protocols; + } + + /** + * Required. Protocols required for the volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Protocols protocols = 12 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProtocols($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\Protocols::class); + $this->protocols = $arr; + + return $this; + } + + /** + * Optional. SMB share settings for the volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SMBSettings smb_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSmbSettings() + { + return $this->smb_settings; + } + + /** + * Optional. SMB share settings for the volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SMBSettings smb_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSmbSettings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\SMBSettings::class); + $this->smb_settings = $arr; + + return $this; + } + + /** + * Output only. Mount options of this volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.MountOption mount_options = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMountOptions() + { + return $this->mount_options; + } + + /** + * Output only. Mount options of this volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.MountOption mount_options = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\NetApp\V1\MountOption>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMountOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\MountOption::class); + $this->mount_options = $arr; + + return $this; + } + + /** + * Optional. Default unix style permission (e.g. 777) the mount point will be + * created with. Applicable for NFS protocol types only. + * + * Generated from protobuf field string unix_permissions = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUnixPermissions() + { + return $this->unix_permissions; + } + + /** + * Optional. Default unix style permission (e.g. 777) the mount point will be + * created with. Applicable for NFS protocol types only. + * + * Generated from protobuf field string unix_permissions = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUnixPermissions($var) + { + GPBUtil::checkString($var, True); + $this->unix_permissions = $var; + + return $this; + } + + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Description of the volume + * + * Generated from protobuf field string description = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the volume + * + * Generated from protobuf field string description = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. SnapshotPolicy for a volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.SnapshotPolicy snapshot_policy = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetApp\V1\SnapshotPolicy|null + */ + public function getSnapshotPolicy() + { + return $this->snapshot_policy; + } + + public function hasSnapshotPolicy() + { + return isset($this->snapshot_policy); + } + + public function clearSnapshotPolicy() + { + unset($this->snapshot_policy); + } + + /** + * Optional. SnapshotPolicy for a volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.SnapshotPolicy snapshot_policy = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetApp\V1\SnapshotPolicy $var + * @return $this + */ + public function setSnapshotPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\SnapshotPolicy::class); + $this->snapshot_policy = $var; + + return $this; + } + + /** + * Optional. Snap_reserve specifies percentage of volume storage reserved for + * snapshot storage. Default is 0 percent. + * + * Generated from protobuf field double snap_reserve = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getSnapReserve() + { + return $this->snap_reserve; + } + + /** + * Optional. Snap_reserve specifies percentage of volume storage reserved for + * snapshot storage. Default is 0 percent. + * + * Generated from protobuf field double snap_reserve = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setSnapReserve($var) + { + GPBUtil::checkDouble($var); + $this->snap_reserve = $var; + + return $this; + } + + /** + * Optional. Snapshot_directory if enabled (true) the volume will contain a + * read-only .snapshot directory which provides access to each of the volume's + * snapshots. + * + * Generated from protobuf field bool snapshot_directory = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSnapshotDirectory() + { + return $this->snapshot_directory; + } + + /** + * Optional. Snapshot_directory if enabled (true) the volume will contain a + * read-only .snapshot directory which provides access to each of the volume's + * snapshots. + * + * Generated from protobuf field bool snapshot_directory = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSnapshotDirectory($var) + { + GPBUtil::checkBool($var); + $this->snapshot_directory = $var; + + return $this; + } + + /** + * Output only. Used capacity in GIB of the volume. This is computed + * periodically and it does not represent the realtime usage. + * + * Generated from protobuf field int64 used_gib = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getUsedGib() + { + return $this->used_gib; + } + + /** + * Output only. Used capacity in GIB of the volume. This is computed + * periodically and it does not represent the realtime usage. + * + * Generated from protobuf field int64 used_gib = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setUsedGib($var) + { + GPBUtil::checkInt64($var); + $this->used_gib = $var; + + return $this; + } + + /** + * Optional. Security Style of the Volume + * + * Generated from protobuf field .google.cloud.netapp.v1.SecurityStyle security_style = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSecurityStyle() + { + return $this->security_style; + } + + /** + * Optional. Security Style of the Volume + * + * Generated from protobuf field .google.cloud.netapp.v1.SecurityStyle security_style = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSecurityStyle($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\SecurityStyle::class); + $this->security_style = $var; + + return $this; + } + + /** + * Optional. Flag indicating if the volume is a kerberos volume or not, export + * policy rules control kerberos security modes (krb5, krb5i, krb5p). + * + * Generated from protobuf field bool kerberos_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getKerberosEnabled() + { + return $this->kerberos_enabled; + } + + /** + * Optional. Flag indicating if the volume is a kerberos volume or not, export + * policy rules control kerberos security modes (krb5, krb5i, krb5p). + * + * Generated from protobuf field bool kerberos_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setKerberosEnabled($var) + { + GPBUtil::checkBool($var); + $this->kerberos_enabled = $var; + + return $this; + } + + /** + * Output only. Flag indicating if the volume is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getLdapEnabled() + { + return $this->ldap_enabled; + } + + /** + * Output only. Flag indicating if the volume is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setLdapEnabled($var) + { + GPBUtil::checkBool($var); + $this->ldap_enabled = $var; + + return $this; + } + + /** + * Output only. Specifies the ActiveDirectory name of a SMB volume. + * + * Generated from protobuf field string active_directory = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getActiveDirectory() + { + return $this->active_directory; + } + + /** + * Output only. Specifies the ActiveDirectory name of a SMB volume. + * + * Generated from protobuf field string active_directory = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setActiveDirectory($var) + { + GPBUtil::checkString($var, True); + $this->active_directory = $var; + + return $this; + } + + /** + * Optional. Specifies the source of the volume to be created from. + * + * Generated from protobuf field .google.cloud.netapp.v1.RestoreParameters restore_parameters = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetApp\V1\RestoreParameters|null + */ + public function getRestoreParameters() + { + return $this->restore_parameters; + } + + public function hasRestoreParameters() + { + return isset($this->restore_parameters); + } + + public function clearRestoreParameters() + { + unset($this->restore_parameters); + } + + /** + * Optional. Specifies the source of the volume to be created from. + * + * Generated from protobuf field .google.cloud.netapp.v1.RestoreParameters restore_parameters = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetApp\V1\RestoreParameters $var + * @return $this + */ + public function setRestoreParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\RestoreParameters::class); + $this->restore_parameters = $var; + + return $this; + } + + /** + * Output only. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 27 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsConfig() + { + return $this->kms_config; + } + + /** + * Output only. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 27 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsConfig($var) + { + GPBUtil::checkString($var, True); + $this->kms_config = $var; + + return $this; + } + + /** + * Output only. Specified the current volume encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEncryptionType() + { + return $this->encryption_type; + } + + /** + * Output only. Specified the current volume encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEncryptionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\EncryptionType::class); + $this->encryption_type = $var; + + return $this; + } + + /** + * Output only. Indicates whether the volume is part of a replication + * relationship. + * + * Generated from protobuf field bool has_replication = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getHasReplication() + { + return $this->has_replication; + } + + /** + * Output only. Indicates whether the volume is part of a replication + * relationship. + * + * Generated from protobuf field bool has_replication = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setHasReplication($var) + { + GPBUtil::checkBool($var); + $this->has_replication = $var; + + return $this; + } + + /** + * BackupConfig of the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + * @return \Google\Cloud\NetApp\V1\BackupConfig|null + */ + public function getBackupConfig() + { + return $this->backup_config; + } + + public function hasBackupConfig() + { + return isset($this->backup_config); + } + + public function clearBackupConfig() + { + unset($this->backup_config); + } + + /** + * BackupConfig of the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + * @param \Google\Cloud\NetApp\V1\BackupConfig $var + * @return $this + */ + public function setBackupConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupConfig::class); + $this->backup_config = $var; + + return $this; + } + + /** + * Optional. List of actions that are restricted on this volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.RestrictedAction restricted_actions = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRestrictedActions() + { + return $this->restricted_actions; + } + + /** + * Optional. List of actions that are restricted on this volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.RestrictedAction restricted_actions = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRestrictedActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\RestrictedAction::class); + $this->restricted_actions = $arr; + + return $this; + } + + /** + * Optional. Flag indicating if the volume will be a large capacity volume or + * a regular volume. + * + * Generated from protobuf field bool large_capacity = 32 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getLargeCapacity() + { + return $this->large_capacity; + } + + /** + * Optional. Flag indicating if the volume will be a large capacity volume or + * a regular volume. + * + * Generated from protobuf field bool large_capacity = 32 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setLargeCapacity($var) + { + GPBUtil::checkBool($var); + $this->large_capacity = $var; + + return $this; + } + + /** + * Optional. Flag indicating if the volume will have an IP address per node + * for volumes supporting multiple IP endpoints. Only the volume with + * large_capacity will be allowed to have multiple endpoints. + * + * Generated from protobuf field bool multiple_endpoints = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getMultipleEndpoints() + { + return $this->multiple_endpoints; + } + + /** + * Optional. Flag indicating if the volume will have an IP address per node + * for volumes supporting multiple IP endpoints. Only the volume with + * large_capacity will be allowed to have multiple endpoints. + * + * Generated from protobuf field bool multiple_endpoints = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setMultipleEndpoints($var) + { + GPBUtil::checkBool($var); + $this->multiple_endpoints = $var; + + return $this; + } + + /** + * Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 34; + * @return \Google\Cloud\NetApp\V1\TieringPolicy|null + */ + public function getTieringPolicy() + { + return $this->tiering_policy; + } + + public function hasTieringPolicy() + { + return isset($this->tiering_policy); + } + + public function clearTieringPolicy() + { + unset($this->tiering_policy); + } + + /** + * Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 34; + * @param \Google\Cloud\NetApp\V1\TieringPolicy $var + * @return $this + */ + public function setTieringPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\TieringPolicy::class); + $this->tiering_policy = $var; + + return $this; + } + + /** + * Output only. Specifies the replica zone for regional volume. + * + * Generated from protobuf field string replica_zone = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getReplicaZone() + { + return $this->replica_zone; + } + + /** + * Output only. Specifies the replica zone for regional volume. + * + * Generated from protobuf field string replica_zone = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setReplicaZone($var) + { + GPBUtil::checkString($var, True); + $this->replica_zone = $var; + + return $this; + } + + /** + * Output only. Specifies the active zone for regional volume. + * + * Generated from protobuf field string zone = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Output only. Specifies the active zone for regional volume. + * + * Generated from protobuf field string zone = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * Output only. Size of the volume cold tier data in GiB. + * + * Generated from protobuf field int64 cold_tier_size_gib = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getColdTierSizeGib() + { + return $this->cold_tier_size_gib; + } + + /** + * Output only. Size of the volume cold tier data in GiB. + * + * Generated from protobuf field int64 cold_tier_size_gib = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setColdTierSizeGib($var) + { + GPBUtil::checkInt64($var); + $this->cold_tier_size_gib = $var; + + return $this; + } + + /** + * Optional. The Hybrid Replication parameters for the volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridReplicationParameters hybrid_replication_parameters = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetApp\V1\HybridReplicationParameters|null + */ + public function getHybridReplicationParameters() + { + return $this->hybrid_replication_parameters; + } + + public function hasHybridReplicationParameters() + { + return isset($this->hybrid_replication_parameters); + } + + public function clearHybridReplicationParameters() + { + unset($this->hybrid_replication_parameters); + } + + /** + * Optional. The Hybrid Replication parameters for the volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridReplicationParameters hybrid_replication_parameters = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetApp\V1\HybridReplicationParameters $var + * @return $this + */ + public function setHybridReplicationParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\HybridReplicationParameters::class); + $this->hybrid_replication_parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php new file mode 100644 index 000000000000..8c26d9d33682 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php @@ -0,0 +1,115 @@ +google.cloud.netapp.v1.Volume.State + */ +class State +{ + /** + * Unspecified Volume State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Volume State is Ready + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * Volume State is Creating + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Volume State is Deleting + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Volume State is Updating + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * Volume State is Restoring + * + * Generated from protobuf enum RESTORING = 5; + */ + const RESTORING = 5; + /** + * Volume State is Disabled + * + * Generated from protobuf enum DISABLED = 6; + */ + const DISABLED = 6; + /** + * Volume State is Error + * + * Generated from protobuf enum ERROR = 7; + */ + const ERROR = 7; + /** + * Volume State is Preparing. Note that this is different from CREATING + * where CREATING means the volume is being created, while PREPARING means + * the volume is created and now being prepared for the replication. + * + * Generated from protobuf enum PREPARING = 8; + */ + const PREPARING = 8; + /** + * Volume State is Read Only + * + * Generated from protobuf enum READ_ONLY = 9; + */ + const READ_ONLY = 9; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::RESTORING => 'RESTORING', + self::DISABLED => 'DISABLED', + self::ERROR => 'ERROR', + self::PREPARING => 'PREPARING', + self::READ_ONLY => 'READ_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\Volume_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php new file mode 100644 index 000000000000..8b126b6825cd --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php @@ -0,0 +1,218 @@ +google.cloud.netapp.v1.WeeklySchedule + */ +class WeeklySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + */ + protected $snapshots_to_keep = null; + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + */ + protected $minute = null; + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + */ + protected $hour = null; + /** + * Set the day or days of the week to make a snapshot. Accepts a comma + * separated days of the week. Defaults to 'Sunday'. + * + * Generated from protobuf field optional string day = 4; + */ + protected $day = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $snapshots_to_keep + * The maximum number of Snapshots to keep for the hourly schedule + * @type float $minute + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * @type float $hour + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * @type string $day + * Set the day or days of the week to make a snapshot. Accepts a comma + * separated days of the week. Defaults to 'Sunday'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @return float + */ + public function getSnapshotsToKeep() + { + return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; + } + + public function hasSnapshotsToKeep() + { + return isset($this->snapshots_to_keep); + } + + public function clearSnapshotsToKeep() + { + unset($this->snapshots_to_keep); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @param float $var + * @return $this + */ + public function setSnapshotsToKeep($var) + { + GPBUtil::checkDouble($var); + $this->snapshots_to_keep = $var; + + return $this; + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @return float + */ + public function getMinute() + { + return isset($this->minute) ? $this->minute : 0.0; + } + + public function hasMinute() + { + return isset($this->minute); + } + + public function clearMinute() + { + unset($this->minute); + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @param float $var + * @return $this + */ + public function setMinute($var) + { + GPBUtil::checkDouble($var); + $this->minute = $var; + + return $this; + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @return float + */ + public function getHour() + { + return isset($this->hour) ? $this->hour : 0.0; + } + + public function hasHour() + { + return isset($this->hour); + } + + public function clearHour() + { + unset($this->hour); + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @param float $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkDouble($var); + $this->hour = $var; + + return $this; + } + + /** + * Set the day or days of the week to make a snapshot. Accepts a comma + * separated days of the week. Defaults to 'Sunday'. + * + * Generated from protobuf field optional string day = 4; + * @return string + */ + public function getDay() + { + return isset($this->day) ? $this->day : ''; + } + + public function hasDay() + { + return isset($this->day); + } + + public function clearDay() + { + unset($this->day); + } + + /** + * Set the day or days of the week to make a snapshot. Accepts a comma + * separated days of the week. Defaults to 'Sunday'. + * + * Generated from protobuf field optional string day = 4; + * @param string $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkString($var, True); + $this->day = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php new file mode 100644 index 000000000000..360838063eaa --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php @@ -0,0 +1,123 @@ +setDomain($activeDirectoryDomain) + ->setDns($activeDirectoryDns) + ->setNetBiosPrefix($activeDirectoryNetBiosPrefix) + ->setUsername($activeDirectoryUsername) + ->setPassword($activeDirectoryPassword); + $request = (new CreateActiveDirectoryRequest()) + ->setParent($formattedParent) + ->setActiveDirectory($activeDirectory) + ->setActiveDirectoryId($activeDirectoryId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createActiveDirectory($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ActiveDirectory $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $activeDirectoryDomain = '[DOMAIN]'; + $activeDirectoryDns = '[DNS]'; + $activeDirectoryNetBiosPrefix = '[NET_BIOS_PREFIX]'; + $activeDirectoryUsername = '[USERNAME]'; + $activeDirectoryPassword = '[PASSWORD]'; + $activeDirectoryId = '[ACTIVE_DIRECTORY_ID]'; + + create_active_directory_sample( + $formattedParent, + $activeDirectoryDomain, + $activeDirectoryDns, + $activeDirectoryNetBiosPrefix, + $activeDirectoryUsername, + $activeDirectoryPassword, + $activeDirectoryId + ); +} +// [END netapp_v1_generated_NetApp_CreateActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php new file mode 100644 index 000000000000..99e4154c3e3a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php @@ -0,0 +1,96 @@ +setParent($formattedParent) + ->setBackupId($backupId) + ->setBackup($backup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createBackup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Backup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $backupId = '[BACKUP_ID]'; + + create_backup_sample($formattedParent, $backupId); +} +// [END netapp_v1_generated_NetApp_CreateBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php new file mode 100644 index 000000000000..fbf433a991d6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setBackupPolicy($backupPolicy) + ->setBackupPolicyId($backupPolicyId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createBackupPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackupPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $backupPolicyId = '[BACKUP_POLICY_ID]'; + + create_backup_policy_sample($formattedParent, $backupPolicyId); +} +// [END netapp_v1_generated_NetApp_CreateBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php new file mode 100644 index 000000000000..d679748843da --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setBackupVaultId($backupVaultId) + ->setBackupVault($backupVault); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createBackupVault($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackupVault $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $backupVaultId = '[BACKUP_VAULT_ID]'; + + create_backup_vault_sample($formattedParent, $backupVaultId); +} +// [END netapp_v1_generated_NetApp_CreateBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php new file mode 100644 index 000000000000..aea45fdee4ec --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php @@ -0,0 +1,98 @@ +setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new CreateKmsConfigRequest()) + ->setParent($formattedParent) + ->setKmsConfigId($kmsConfigId) + ->setKmsConfig($kmsConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createKmsConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var KmsConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $kmsConfigId = '[KMS_CONFIG_ID]'; + $kmsConfigCryptoKeyName = '[CRYPTO_KEY_NAME]'; + + create_kms_config_sample($formattedParent, $kmsConfigId, $kmsConfigCryptoKeyName); +} +// [END netapp_v1_generated_NetApp_CreateKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php new file mode 100644 index 000000000000..62b877f14aa7 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php @@ -0,0 +1,116 @@ +setStoragePool($formattedReplicationDestinationVolumeParametersStoragePool); + $replication = (new Replication()) + ->setReplicationSchedule($replicationReplicationSchedule) + ->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $request = (new CreateReplicationRequest()) + ->setParent($formattedParent) + ->setReplication($replication) + ->setReplicationId($replicationId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $formattedReplicationDestinationVolumeParametersStoragePool = NetAppClient::storagePoolName( + '[PROJECT]', + '[LOCATION]', + '[STORAGE_POOL]' + ); + $replicationId = '[REPLICATION_ID]'; + + create_replication_sample( + $formattedParent, + $replicationReplicationSchedule, + $formattedReplicationDestinationVolumeParametersStoragePool, + $replicationId + ); +} +// [END netapp_v1_generated_NetApp_CreateReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php new file mode 100644 index 000000000000..1c26d056b2e1 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setSnapshot($snapshot) + ->setSnapshotId($snapshotId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createSnapshot($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Snapshot $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshotId = '[SNAPSHOT_ID]'; + + create_snapshot_sample($formattedParent, $snapshotId); +} +// [END netapp_v1_generated_NetApp_CreateSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php new file mode 100644 index 000000000000..c301410c7fbf --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php @@ -0,0 +1,114 @@ +setServiceLevel($storagePoolServiceLevel) + ->setCapacityGib($storagePoolCapacityGib) + ->setNetwork($formattedStoragePoolNetwork); + $request = (new CreateStoragePoolRequest()) + ->setParent($formattedParent) + ->setStoragePoolId($storagePoolId) + ->setStoragePool($storagePool); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createStoragePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StoragePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $storagePoolId = '[STORAGE_POOL_ID]'; + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePoolCapacityGib = 0; + $formattedStoragePoolNetwork = NetAppClient::networkName('[PROJECT]', '[NETWORK]'); + + create_storage_pool_sample( + $formattedParent, + $storagePoolId, + $storagePoolServiceLevel, + $storagePoolCapacityGib, + $formattedStoragePoolNetwork + ); +} +// [END netapp_v1_generated_NetApp_CreateStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php new file mode 100644 index 000000000000..7af7fb7b6213 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php @@ -0,0 +1,123 @@ +setShareName($volumeShareName) + ->setStoragePool($formattedVolumeStoragePool) + ->setCapacityGib($volumeCapacityGib) + ->setProtocols($volumeProtocols); + $request = (new CreateVolumeRequest()) + ->setParent($formattedParent) + ->setVolumeId($volumeId) + ->setVolume($volume); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createVolume($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Volume $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $volumeId = '[VOLUME_ID]'; + $volumeShareName = '[SHARE_NAME]'; + $formattedVolumeStoragePool = NetAppClient::storagePoolName( + '[PROJECT]', + '[LOCATION]', + '[STORAGE_POOL]' + ); + $volumeCapacityGib = 0; + $volumeProtocolsElement = Protocols::PROTOCOLS_UNSPECIFIED; + + create_volume_sample( + $formattedParent, + $volumeId, + $volumeShareName, + $formattedVolumeStoragePool, + $volumeCapacityGib, + $volumeProtocolsElement + ); +} +// [END netapp_v1_generated_NetApp_CreateVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php new file mode 100644 index 000000000000..b4a0ff6a2a93 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteActiveDirectory($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + + delete_active_directory_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php new file mode 100644 index 000000000000..a3be0938a6c6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteBackup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + + delete_backup_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php new file mode 100644 index 000000000000..2bc2925d7fd3 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteBackupPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + + delete_backup_policy_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php new file mode 100644 index 000000000000..ebcb45572c0d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteBackupVault($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + + delete_backup_vault_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php new file mode 100644 index 000000000000..22e8dbaa4362 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteKmsConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + + delete_kms_config_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php new file mode 100644 index 000000000000..a9980d4e21c6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + delete_replication_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php new file mode 100644 index 000000000000..6b35b9b7f641 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteSnapshot($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + + delete_snapshot_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php new file mode 100644 index 000000000000..3307ad1739df --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteStoragePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + + delete_storage_pool_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php new file mode 100644 index 000000000000..fbe680b5f5f2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteVolume($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + delete_volume_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php new file mode 100644 index 000000000000..fbe35c32d359 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->encryptVolumes($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var KmsConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + + encrypt_volumes_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_EncryptVolumes_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php new file mode 100644 index 000000000000..be35f66b1e4d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php @@ -0,0 +1,105 @@ +setName($formattedName) + ->setPeerClusterName($peerClusterName) + ->setPeerSvmName($peerSvmName) + ->setPeerVolumeName($peerVolumeName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->establishPeering($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + $peerClusterName = '[PEER_CLUSTER_NAME]'; + $peerSvmName = '[PEER_SVM_NAME]'; + $peerVolumeName = '[PEER_VOLUME_NAME]'; + + establish_peering_sample($formattedName, $peerClusterName, $peerSvmName, $peerVolumeName); +} +// [END netapp_v1_generated_NetApp_EstablishPeering_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php new file mode 100644 index 000000000000..b3bedd34d954 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ActiveDirectory $response */ + $response = $netAppClient->getActiveDirectory($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + + get_active_directory_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php new file mode 100644 index 000000000000..e82ad8f83d81 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Backup $response */ + $response = $netAppClient->getBackup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + + get_backup_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php new file mode 100644 index 000000000000..d255b60a3689 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BackupPolicy $response */ + $response = $netAppClient->getBackupPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + + get_backup_policy_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php new file mode 100644 index 000000000000..ebfb08fa661c --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BackupVault $response */ + $response = $netAppClient->getBackupVault($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + + get_backup_vault_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php new file mode 100644 index 000000000000..910476a88480 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var KmsConfig $response */ + $response = $netAppClient->getKmsConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + + get_kms_config_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php new file mode 100644 index 000000000000..da552a232fbb --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_GetLocation_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php new file mode 100644 index 000000000000..91b1aa4a238b --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Replication $response */ + $response = $netAppClient->getReplication($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + get_replication_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php new file mode 100644 index 000000000000..bbcc5660fac7 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Snapshot $response */ + $response = $netAppClient->getSnapshot($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + + get_snapshot_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php new file mode 100644 index 000000000000..31e2d35f0341 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var StoragePool $response */ + $response = $netAppClient->getStoragePool($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + + get_storage_pool_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php new file mode 100644 index 000000000000..d5598718a06b --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Volume $response */ + $response = $netAppClient->getVolume($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + get_volume_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php new file mode 100644 index 000000000000..6c11b9b031f1 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listActiveDirectories($request); + + /** @var ActiveDirectory $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_active_directories_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListActiveDirectories_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php new file mode 100644 index 000000000000..fe0b33a9dbad --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listBackupPolicies($request); + + /** @var BackupPolicy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backup_policies_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListBackupPolicies_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php new file mode 100644 index 000000000000..51fca830aeff --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listBackupVaults($request); + + /** @var BackupVault $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backup_vaults_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListBackupVaults_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php new file mode 100644 index 000000000000..9d686d904e64 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listBackups($request); + + /** @var Backup $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + + list_backups_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListBackups_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php new file mode 100644 index 000000000000..641b28b9f7a1 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listKmsConfigs($request); + + /** @var KmsConfig $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_kms_configs_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListKmsConfigs_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php new file mode 100644 index 000000000000..34e95bff6562 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_ListLocations_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php new file mode 100644 index 000000000000..98981f3ca891 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listReplications($request); + + /** @var Replication $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + list_replications_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListReplications_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php new file mode 100644 index 000000000000..e88ad83cb1a8 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listSnapshots($request); + + /** @var Snapshot $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + list_snapshots_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListSnapshots_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php new file mode 100644 index 000000000000..a700f8ae079f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listStoragePools($request); + + /** @var StoragePool $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_storage_pools_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListStoragePools_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php new file mode 100644 index 000000000000..bde278d49961 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listVolumes($request); + + /** @var Volume $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_volumes_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListVolumes_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php new file mode 100644 index 000000000000..6494667234b3 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->resumeReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + resume_replication_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_ResumeReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php new file mode 100644 index 000000000000..970e1707c2e5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->reverseReplicationDirection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + reverse_replication_direction_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_ReverseReplicationDirection_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php new file mode 100644 index 000000000000..c5d4f3cf098d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php @@ -0,0 +1,91 @@ +setName($formattedName) + ->setSnapshotId($snapshotId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->revertVolume($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Volume $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshotId = '[SNAPSHOT_ID]'; + + revert_volume_sample($formattedName, $snapshotId); +} +// [END netapp_v1_generated_NetApp_RevertVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php new file mode 100644 index 000000000000..6039951c757b --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->stopReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + stop_replication_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_StopReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php new file mode 100644 index 000000000000..e193a72329fb --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->switchActiveReplicaZone($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StoragePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + + switch_active_replica_zone_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_SwitchActiveReplicaZone_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php new file mode 100644 index 000000000000..a5c56078ede4 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->syncReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + sync_replication_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_SyncReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php new file mode 100644 index 000000000000..8dfc7a9b3277 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php @@ -0,0 +1,111 @@ +setDomain($activeDirectoryDomain) + ->setDns($activeDirectoryDns) + ->setNetBiosPrefix($activeDirectoryNetBiosPrefix) + ->setUsername($activeDirectoryUsername) + ->setPassword($activeDirectoryPassword); + $request = (new UpdateActiveDirectoryRequest()) + ->setUpdateMask($updateMask) + ->setActiveDirectory($activeDirectory); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateActiveDirectory($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ActiveDirectory $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $activeDirectoryDomain = '[DOMAIN]'; + $activeDirectoryDns = '[DNS]'; + $activeDirectoryNetBiosPrefix = '[NET_BIOS_PREFIX]'; + $activeDirectoryUsername = '[USERNAME]'; + $activeDirectoryPassword = '[PASSWORD]'; + + update_active_directory_sample( + $activeDirectoryDomain, + $activeDirectoryDns, + $activeDirectoryNetBiosPrefix, + $activeDirectoryUsername, + $activeDirectoryPassword + ); +} +// [END netapp_v1_generated_NetApp_UpdateActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php new file mode 100644 index 000000000000..5507ac77c7bd --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setBackup($backup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateBackup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Backup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_UpdateBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php new file mode 100644 index 000000000000..5758fb82d93f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setBackupPolicy($backupPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateBackupPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackupPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php new file mode 100644 index 000000000000..31be5bfad0cd --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setBackupVault($backupVault); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateBackupVault($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackupVault $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php new file mode 100644 index 000000000000..6a15a2399065 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php @@ -0,0 +1,88 @@ +setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new UpdateKmsConfigRequest()) + ->setUpdateMask($updateMask) + ->setKmsConfig($kmsConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateKmsConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var KmsConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $kmsConfigCryptoKeyName = '[CRYPTO_KEY_NAME]'; + + update_kms_config_sample($kmsConfigCryptoKeyName); +} +// [END netapp_v1_generated_NetApp_UpdateKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php new file mode 100644 index 000000000000..7fa801ca481a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php @@ -0,0 +1,104 @@ +setStoragePool($formattedReplicationDestinationVolumeParametersStoragePool); + $replication = (new Replication()) + ->setReplicationSchedule($replicationReplicationSchedule) + ->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $request = (new UpdateReplicationRequest()) + ->setUpdateMask($updateMask) + ->setReplication($replication); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $formattedReplicationDestinationVolumeParametersStoragePool = NetAppClient::storagePoolName( + '[PROJECT]', + '[LOCATION]', + '[STORAGE_POOL]' + ); + + update_replication_sample( + $replicationReplicationSchedule, + $formattedReplicationDestinationVolumeParametersStoragePool + ); +} +// [END netapp_v1_generated_NetApp_UpdateReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php new file mode 100644 index 000000000000..f5df91947284 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setSnapshot($snapshot); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateSnapshot($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Snapshot $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_UpdateSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php new file mode 100644 index 000000000000..838ed04c11e1 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php @@ -0,0 +1,103 @@ +setServiceLevel($storagePoolServiceLevel) + ->setCapacityGib($storagePoolCapacityGib) + ->setNetwork($formattedStoragePoolNetwork); + $request = (new UpdateStoragePoolRequest()) + ->setUpdateMask($updateMask) + ->setStoragePool($storagePool); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateStoragePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StoragePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePoolCapacityGib = 0; + $formattedStoragePoolNetwork = NetAppClient::networkName('[PROJECT]', '[NETWORK]'); + + update_storage_pool_sample( + $storagePoolServiceLevel, + $storagePoolCapacityGib, + $formattedStoragePoolNetwork + ); +} +// [END netapp_v1_generated_NetApp_UpdateStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php new file mode 100644 index 000000000000..a4958e603c2c --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php @@ -0,0 +1,112 @@ +setShareName($volumeShareName) + ->setStoragePool($formattedVolumeStoragePool) + ->setCapacityGib($volumeCapacityGib) + ->setProtocols($volumeProtocols); + $request = (new UpdateVolumeRequest()) + ->setUpdateMask($updateMask) + ->setVolume($volume); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateVolume($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Volume $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $volumeShareName = '[SHARE_NAME]'; + $formattedVolumeStoragePool = NetAppClient::storagePoolName( + '[PROJECT]', + '[LOCATION]', + '[STORAGE_POOL]' + ); + $volumeCapacityGib = 0; + $volumeProtocolsElement = Protocols::PROTOCOLS_UNSPECIFIED; + + update_volume_sample( + $volumeShareName, + $formattedVolumeStoragePool, + $volumeCapacityGib, + $volumeProtocolsElement + ); +} +// [END netapp_v1_generated_NetApp_UpdateVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php new file mode 100644 index 000000000000..351da5a758e9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VerifyKmsConfigResponse $response */ + $response = $netAppClient->verifyKmsConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + + verify_kms_config_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_VerifyKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php b/owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php new file mode 100644 index 000000000000..e931b83a3aba --- /dev/null +++ b/owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php @@ -0,0 +1,2056 @@ + createActiveDirectoryAsync(CreateActiveDirectoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackupAsync(CreateBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackupPolicyAsync(CreateBackupPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackupVaultAsync(CreateBackupVaultRequest $request, array $optionalArgs = []) + * @method PromiseInterface createKmsConfigAsync(CreateKmsConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReplicationAsync(CreateReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSnapshotAsync(CreateSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface createStoragePoolAsync(CreateStoragePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVolumeAsync(CreateVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteActiveDirectoryAsync(DeleteActiveDirectoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupPolicyAsync(DeleteBackupPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupVaultAsync(DeleteBackupVaultRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteKmsConfigAsync(DeleteKmsConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReplicationAsync(DeleteReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSnapshotAsync(DeleteSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteStoragePoolAsync(DeleteStoragePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteVolumeAsync(DeleteVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface encryptVolumesAsync(EncryptVolumesRequest $request, array $optionalArgs = []) + * @method PromiseInterface establishPeeringAsync(EstablishPeeringRequest $request, array $optionalArgs = []) + * @method PromiseInterface getActiveDirectoryAsync(GetActiveDirectoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupPolicyAsync(GetBackupPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupVaultAsync(GetBackupVaultRequest $request, array $optionalArgs = []) + * @method PromiseInterface getKmsConfigAsync(GetKmsConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReplicationAsync(GetReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSnapshotAsync(GetSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface getStoragePoolAsync(GetStoragePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVolumeAsync(GetVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface listActiveDirectoriesAsync(ListActiveDirectoriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupPoliciesAsync(ListBackupPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupVaultsAsync(ListBackupVaultsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listKmsConfigsAsync(ListKmsConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReplicationsAsync(ListReplicationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSnapshotsAsync(ListSnapshotsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listStoragePoolsAsync(ListStoragePoolsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVolumesAsync(ListVolumesRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumeReplicationAsync(ResumeReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface reverseReplicationDirectionAsync(ReverseReplicationDirectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface revertVolumeAsync(RevertVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopReplicationAsync(StopReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface switchActiveReplicaZoneAsync(SwitchActiveReplicaZoneRequest $request, array $optionalArgs = []) + * @method PromiseInterface syncReplicationAsync(SyncReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateActiveDirectoryAsync(UpdateActiveDirectoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackupPolicyAsync(UpdateBackupPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackupVaultAsync(UpdateBackupVaultRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateKmsConfigAsync(UpdateKmsConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateReplicationAsync(UpdateReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSnapshotAsync(UpdateSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateStoragePoolAsync(UpdateStoragePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateVolumeAsync(UpdateVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface verifyKmsConfigAsync(VerifyKmsConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class NetAppClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.netapp.v1.NetApp'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'netapp.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'netapp.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/net_app_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/net_app_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/net_app_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/net_app_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * active_directory resource. + * + * @param string $project + * @param string $location + * @param string $activeDirectory + * + * @return string The formatted active_directory resource. + */ + public static function activeDirectoryName(string $project, string $location, string $activeDirectory): string + { + return self::getPathTemplate('activeDirectory')->render([ + 'project' => $project, + 'location' => $location, + 'active_directory' => $activeDirectory, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a backup + * resource. + * + * @param string $project + * @param string $location + * @param string $backupVault + * @param string $backup + * + * @return string The formatted backup resource. + */ + public static function backupName(string $project, string $location, string $backupVault, string $backup): string + { + return self::getPathTemplate('backup')->render([ + 'project' => $project, + 'location' => $location, + 'backup_vault' => $backupVault, + 'backup' => $backup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * backup_policy resource. + * + * @param string $project + * @param string $location + * @param string $backupPolicy + * + * @return string The formatted backup_policy resource. + */ + public static function backupPolicyName(string $project, string $location, string $backupPolicy): string + { + return self::getPathTemplate('backupPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'backup_policy' => $backupPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a backup_vault + * resource. + * + * @param string $project + * @param string $location + * @param string $backupVault + * + * @return string The formatted backup_vault resource. + */ + public static function backupVaultName(string $project, string $location, string $backupVault): string + { + return self::getPathTemplate('backupVault')->render([ + 'project' => $project, + 'location' => $location, + 'backup_vault' => $backupVault, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a kms_config + * resource. + * + * @param string $project + * @param string $location + * @param string $kmsConfig + * + * @return string The formatted kms_config resource. + */ + public static function kmsConfigName(string $project, string $location, string $kmsConfig): string + { + return self::getPathTemplate('kmsConfig')->render([ + 'project' => $project, + 'location' => $location, + 'kms_config' => $kmsConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a replication + * resource. + * + * @param string $project + * @param string $location + * @param string $volume + * @param string $replication + * + * @return string The formatted replication resource. + */ + public static function replicationName(string $project, string $location, string $volume, string $replication): string + { + return self::getPathTemplate('replication')->render([ + 'project' => $project, + 'location' => $location, + 'volume' => $volume, + 'replication' => $replication, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a snapshot + * resource. + * + * @param string $project + * @param string $location + * @param string $volume + * @param string $snapshot + * + * @return string The formatted snapshot resource. + */ + public static function snapshotName(string $project, string $location, string $volume, string $snapshot): string + { + return self::getPathTemplate('snapshot')->render([ + 'project' => $project, + 'location' => $location, + 'volume' => $volume, + 'snapshot' => $snapshot, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a storage_pool + * resource. + * + * @param string $project + * @param string $location + * @param string $storagePool + * + * @return string The formatted storage_pool resource. + */ + public static function storagePoolName(string $project, string $location, string $storagePool): string + { + return self::getPathTemplate('storagePool')->render([ + 'project' => $project, + 'location' => $location, + 'storage_pool' => $storagePool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a volume + * resource. + * + * @param string $project + * @param string $location + * @param string $volume + * + * @return string The formatted volume resource. + */ + public static function volumeName(string $project, string $location, string $volume): string + { + return self::getPathTemplate('volume')->render([ + 'project' => $project, + 'location' => $location, + 'volume' => $volume, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - activeDirectory: projects/{project}/locations/{location}/activeDirectories/{active_directory} + * - backup: projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup} + * - backupPolicy: projects/{project}/locations/{location}/backupPolicies/{backup_policy} + * - backupVault: projects/{project}/locations/{location}/backupVaults/{backup_vault} + * - kmsConfig: projects/{project}/locations/{location}/kmsConfigs/{kms_config} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - replication: projects/{project}/locations/{location}/volumes/{volume}/replications/{replication} + * - snapshot: projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + * - storagePool: projects/{project}/locations/{location}/storagePools/{storage_pool} + * - volume: projects/{project}/locations/{location}/volumes/{volume} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'netapp.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * CreateActiveDirectory + * Creates the active directory specified in the request. + * + * The async variant is {@see NetAppClient::createActiveDirectoryAsync()} . + * + * @example samples/V1/NetAppClient/create_active_directory.php + * + * @param CreateActiveDirectoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createActiveDirectory(CreateActiveDirectoryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateActiveDirectory', $request, $callOptions)->wait(); + } + + /** + * Creates a backup from the volume specified in the request + * The backup can be created from the given snapshot if specified in the + * request. If no snapshot specified, there'll be a new snapshot taken to + * initiate the backup creation. + * + * The async variant is {@see NetAppClient::createBackupAsync()} . + * + * @example samples/V1/NetAppClient/create_backup.php + * + * @param CreateBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBackup(CreateBackupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateBackup', $request, $callOptions)->wait(); + } + + /** + * Creates new backup policy + * + * The async variant is {@see NetAppClient::createBackupPolicyAsync()} . + * + * @example samples/V1/NetAppClient/create_backup_policy.php + * + * @param CreateBackupPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBackupPolicy(CreateBackupPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateBackupPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates new backup vault + * + * The async variant is {@see NetAppClient::createBackupVaultAsync()} . + * + * @example samples/V1/NetAppClient/create_backup_vault.php + * + * @param CreateBackupVaultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBackupVault(CreateBackupVaultRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateBackupVault', $request, $callOptions)->wait(); + } + + /** + * Creates a new KMS config. + * + * The async variant is {@see NetAppClient::createKmsConfigAsync()} . + * + * @example samples/V1/NetAppClient/create_kms_config.php + * + * @param CreateKmsConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createKmsConfig(CreateKmsConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateKmsConfig', $request, $callOptions)->wait(); + } + + /** + * Create a new replication for a volume. + * + * The async variant is {@see NetAppClient::createReplicationAsync()} . + * + * @example samples/V1/NetAppClient/create_replication.php + * + * @param CreateReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReplication(CreateReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateReplication', $request, $callOptions)->wait(); + } + + /** + * Create a new snapshot for a volume. + * + * The async variant is {@see NetAppClient::createSnapshotAsync()} . + * + * @example samples/V1/NetAppClient/create_snapshot.php + * + * @param CreateSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSnapshot(CreateSnapshotRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSnapshot', $request, $callOptions)->wait(); + } + + /** + * Creates a new storage pool. + * + * The async variant is {@see NetAppClient::createStoragePoolAsync()} . + * + * @example samples/V1/NetAppClient/create_storage_pool.php + * + * @param CreateStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createStoragePool(CreateStoragePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateStoragePool', $request, $callOptions)->wait(); + } + + /** + * Creates a new Volume in a given project and location. + * + * The async variant is {@see NetAppClient::createVolumeAsync()} . + * + * @example samples/V1/NetAppClient/create_volume.php + * + * @param CreateVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createVolume(CreateVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateVolume', $request, $callOptions)->wait(); + } + + /** + * Delete the active directory specified in the request. + * + * The async variant is {@see NetAppClient::deleteActiveDirectoryAsync()} . + * + * @example samples/V1/NetAppClient/delete_active_directory.php + * + * @param DeleteActiveDirectoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteActiveDirectory(DeleteActiveDirectoryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteActiveDirectory', $request, $callOptions)->wait(); + } + + /** + * Warning! This operation will permanently delete the backup. + * + * The async variant is {@see NetAppClient::deleteBackupAsync()} . + * + * @example samples/V1/NetAppClient/delete_backup.php + * + * @param DeleteBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackup(DeleteBackupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); + } + + /** + * Warning! This operation will permanently delete the backup policy. + * + * The async variant is {@see NetAppClient::deleteBackupPolicyAsync()} . + * + * @example samples/V1/NetAppClient/delete_backup_policy.php + * + * @param DeleteBackupPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackupPolicy(DeleteBackupPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteBackupPolicy', $request, $callOptions)->wait(); + } + + /** + * Warning! This operation will permanently delete the backup vault. + * + * The async variant is {@see NetAppClient::deleteBackupVaultAsync()} . + * + * @example samples/V1/NetAppClient/delete_backup_vault.php + * + * @param DeleteBackupVaultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackupVault(DeleteBackupVaultRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteBackupVault', $request, $callOptions)->wait(); + } + + /** + * Warning! This operation will permanently delete the Kms config. + * + * The async variant is {@see NetAppClient::deleteKmsConfigAsync()} . + * + * @example samples/V1/NetAppClient/delete_kms_config.php + * + * @param DeleteKmsConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteKmsConfig(DeleteKmsConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteKmsConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes a replication. + * + * The async variant is {@see NetAppClient::deleteReplicationAsync()} . + * + * @example samples/V1/NetAppClient/delete_replication.php + * + * @param DeleteReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteReplication(DeleteReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteReplication', $request, $callOptions)->wait(); + } + + /** + * Deletes a snapshot. + * + * The async variant is {@see NetAppClient::deleteSnapshotAsync()} . + * + * @example samples/V1/NetAppClient/delete_snapshot.php + * + * @param DeleteSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSnapshot(DeleteSnapshotRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSnapshot', $request, $callOptions)->wait(); + } + + /** + * Warning! This operation will permanently delete the storage pool. + * + * The async variant is {@see NetAppClient::deleteStoragePoolAsync()} . + * + * @example samples/V1/NetAppClient/delete_storage_pool.php + * + * @param DeleteStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteStoragePool(DeleteStoragePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteStoragePool', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Volume. + * + * The async variant is {@see NetAppClient::deleteVolumeAsync()} . + * + * @example samples/V1/NetAppClient/delete_volume.php + * + * @param DeleteVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteVolume(DeleteVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteVolume', $request, $callOptions)->wait(); + } + + /** + * Encrypt the existing volumes without CMEK encryption with the desired the + * KMS config for the whole region. + * + * The async variant is {@see NetAppClient::encryptVolumesAsync()} . + * + * @example samples/V1/NetAppClient/encrypt_volumes.php + * + * @param EncryptVolumesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function encryptVolumes(EncryptVolumesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('EncryptVolumes', $request, $callOptions)->wait(); + } + + /** + * Establish replication peering. + * + * The async variant is {@see NetAppClient::establishPeeringAsync()} . + * + * @example samples/V1/NetAppClient/establish_peering.php + * + * @param EstablishPeeringRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function establishPeering(EstablishPeeringRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('EstablishPeering', $request, $callOptions)->wait(); + } + + /** + * Describes a specified active directory. + * + * The async variant is {@see NetAppClient::getActiveDirectoryAsync()} . + * + * @example samples/V1/NetAppClient/get_active_directory.php + * + * @param GetActiveDirectoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ActiveDirectory + * + * @throws ApiException Thrown if the API call fails. + */ + public function getActiveDirectory(GetActiveDirectoryRequest $request, array $callOptions = []): ActiveDirectory + { + return $this->startApiCall('GetActiveDirectory', $request, $callOptions)->wait(); + } + + /** + * Returns the description of the specified backup + * + * The async variant is {@see NetAppClient::getBackupAsync()} . + * + * @example samples/V1/NetAppClient/get_backup.php + * + * @param GetBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Backup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup + { + return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); + } + + /** + * Returns the description of the specified backup policy by backup_policy_id. + * + * The async variant is {@see NetAppClient::getBackupPolicyAsync()} . + * + * @example samples/V1/NetAppClient/get_backup_policy.php + * + * @param GetBackupPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackupPolicy(GetBackupPolicyRequest $request, array $callOptions = []): BackupPolicy + { + return $this->startApiCall('GetBackupPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns the description of the specified backup vault + * + * The async variant is {@see NetAppClient::getBackupVaultAsync()} . + * + * @example samples/V1/NetAppClient/get_backup_vault.php + * + * @param GetBackupVaultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupVault + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackupVault(GetBackupVaultRequest $request, array $callOptions = []): BackupVault + { + return $this->startApiCall('GetBackupVault', $request, $callOptions)->wait(); + } + + /** + * Returns the description of the specified KMS config by kms_config_id. + * + * The async variant is {@see NetAppClient::getKmsConfigAsync()} . + * + * @example samples/V1/NetAppClient/get_kms_config.php + * + * @param GetKmsConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return KmsConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getKmsConfig(GetKmsConfigRequest $request, array $callOptions = []): KmsConfig + { + return $this->startApiCall('GetKmsConfig', $request, $callOptions)->wait(); + } + + /** + * Describe a replication for a volume. + * + * The async variant is {@see NetAppClient::getReplicationAsync()} . + * + * @example samples/V1/NetAppClient/get_replication.php + * + * @param GetReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Replication + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReplication(GetReplicationRequest $request, array $callOptions = []): Replication + { + return $this->startApiCall('GetReplication', $request, $callOptions)->wait(); + } + + /** + * Describe a snapshot for a volume. + * + * The async variant is {@see NetAppClient::getSnapshotAsync()} . + * + * @example samples/V1/NetAppClient/get_snapshot.php + * + * @param GetSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Snapshot + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSnapshot(GetSnapshotRequest $request, array $callOptions = []): Snapshot + { + return $this->startApiCall('GetSnapshot', $request, $callOptions)->wait(); + } + + /** + * Returns the description of the specified storage pool by poolId. + * + * The async variant is {@see NetAppClient::getStoragePoolAsync()} . + * + * @example samples/V1/NetAppClient/get_storage_pool.php + * + * @param GetStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StoragePool + * + * @throws ApiException Thrown if the API call fails. + */ + public function getStoragePool(GetStoragePoolRequest $request, array $callOptions = []): StoragePool + { + return $this->startApiCall('GetStoragePool', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Volume. + * + * The async variant is {@see NetAppClient::getVolumeAsync()} . + * + * @example samples/V1/NetAppClient/get_volume.php + * + * @param GetVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Volume + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVolume(GetVolumeRequest $request, array $callOptions = []): Volume + { + return $this->startApiCall('GetVolume', $request, $callOptions)->wait(); + } + + /** + * Lists active directories. + * + * The async variant is {@see NetAppClient::listActiveDirectoriesAsync()} . + * + * @example samples/V1/NetAppClient/list_active_directories.php + * + * @param ListActiveDirectoriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listActiveDirectories(ListActiveDirectoriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListActiveDirectories', $request, $callOptions); + } + + /** + * Returns list of all available backup policies. + * + * The async variant is {@see NetAppClient::listBackupPoliciesAsync()} . + * + * @example samples/V1/NetAppClient/list_backup_policies.php + * + * @param ListBackupPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackupPolicies(ListBackupPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBackupPolicies', $request, $callOptions); + } + + /** + * Returns list of all available backup vaults. + * + * The async variant is {@see NetAppClient::listBackupVaultsAsync()} . + * + * @example samples/V1/NetAppClient/list_backup_vaults.php + * + * @param ListBackupVaultsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackupVaults(ListBackupVaultsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBackupVaults', $request, $callOptions); + } + + /** + * Returns descriptions of all backups for a backupVault. + * + * The async variant is {@see NetAppClient::listBackupsAsync()} . + * + * @example samples/V1/NetAppClient/list_backups.php + * + * @param ListBackupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBackups', $request, $callOptions); + } + + /** + * Returns descriptions of all KMS configs owned by the caller. + * + * The async variant is {@see NetAppClient::listKmsConfigsAsync()} . + * + * @example samples/V1/NetAppClient/list_kms_configs.php + * + * @param ListKmsConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listKmsConfigs(ListKmsConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListKmsConfigs', $request, $callOptions); + } + + /** + * Returns descriptions of all replications for a volume. + * + * The async variant is {@see NetAppClient::listReplicationsAsync()} . + * + * @example samples/V1/NetAppClient/list_replications.php + * + * @param ListReplicationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listReplications(ListReplicationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReplications', $request, $callOptions); + } + + /** + * Returns descriptions of all snapshots for a volume. + * + * The async variant is {@see NetAppClient::listSnapshotsAsync()} . + * + * @example samples/V1/NetAppClient/list_snapshots.php + * + * @param ListSnapshotsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSnapshots(ListSnapshotsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSnapshots', $request, $callOptions); + } + + /** + * Returns descriptions of all storage pools owned by the caller. + * + * The async variant is {@see NetAppClient::listStoragePoolsAsync()} . + * + * @example samples/V1/NetAppClient/list_storage_pools.php + * + * @param ListStoragePoolsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listStoragePools(ListStoragePoolsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListStoragePools', $request, $callOptions); + } + + /** + * Lists Volumes in a given project. + * + * The async variant is {@see NetAppClient::listVolumesAsync()} . + * + * @example samples/V1/NetAppClient/list_volumes.php + * + * @param ListVolumesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listVolumes(ListVolumesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVolumes', $request, $callOptions); + } + + /** + * Resume Cross Region Replication. + * + * The async variant is {@see NetAppClient::resumeReplicationAsync()} . + * + * @example samples/V1/NetAppClient/resume_replication.php + * + * @param ResumeReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resumeReplication(ResumeReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResumeReplication', $request, $callOptions)->wait(); + } + + /** + * Reverses direction of replication. Source becomes destination and + * destination becomes source. + * + * The async variant is {@see NetAppClient::reverseReplicationDirectionAsync()} . + * + * @example samples/V1/NetAppClient/reverse_replication_direction.php + * + * @param ReverseReplicationDirectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function reverseReplicationDirection(ReverseReplicationDirectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ReverseReplicationDirection', $request, $callOptions)->wait(); + } + + /** + * Revert an existing volume to a specified snapshot. + * Warning! This operation will permanently revert all changes made after the + * snapshot was created. + * + * The async variant is {@see NetAppClient::revertVolumeAsync()} . + * + * @example samples/V1/NetAppClient/revert_volume.php + * + * @param RevertVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function revertVolume(RevertVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RevertVolume', $request, $callOptions)->wait(); + } + + /** + * Stop Cross Region Replication. + * + * The async variant is {@see NetAppClient::stopReplicationAsync()} . + * + * @example samples/V1/NetAppClient/stop_replication.php + * + * @param StopReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopReplication(StopReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StopReplication', $request, $callOptions)->wait(); + } + + /** + * This operation will switch the active/replica zone for a regional + * storagePool. + * + * The async variant is {@see NetAppClient::switchActiveReplicaZoneAsync()} . + * + * @example samples/V1/NetAppClient/switch_active_replica_zone.php + * + * @param SwitchActiveReplicaZoneRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function switchActiveReplicaZone(SwitchActiveReplicaZoneRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SwitchActiveReplicaZone', $request, $callOptions)->wait(); + } + + /** + * Syncs the replication. This will invoke one time volume data transfer from + * source to destination. + * + * The async variant is {@see NetAppClient::syncReplicationAsync()} . + * + * @example samples/V1/NetAppClient/sync_replication.php + * + * @param SyncReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function syncReplication(SyncReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SyncReplication', $request, $callOptions)->wait(); + } + + /** + * Update the parameters of an active directories. + * + * The async variant is {@see NetAppClient::updateActiveDirectoryAsync()} . + * + * @example samples/V1/NetAppClient/update_active_directory.php + * + * @param UpdateActiveDirectoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateActiveDirectory(UpdateActiveDirectoryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateActiveDirectory', $request, $callOptions)->wait(); + } + + /** + * Update backup with full spec. + * + * The async variant is {@see NetAppClient::updateBackupAsync()} . + * + * @example samples/V1/NetAppClient/update_backup.php + * + * @param UpdateBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackup(UpdateBackupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateBackup', $request, $callOptions)->wait(); + } + + /** + * Updates settings of a specific backup policy. + * + * The async variant is {@see NetAppClient::updateBackupPolicyAsync()} . + * + * @example samples/V1/NetAppClient/update_backup_policy.php + * + * @param UpdateBackupPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackupPolicy(UpdateBackupPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateBackupPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the settings of a specific backup vault. + * + * The async variant is {@see NetAppClient::updateBackupVaultAsync()} . + * + * @example samples/V1/NetAppClient/update_backup_vault.php + * + * @param UpdateBackupVaultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackupVault(UpdateBackupVaultRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateBackupVault', $request, $callOptions)->wait(); + } + + /** + * Updates the Kms config properties with the full spec + * + * The async variant is {@see NetAppClient::updateKmsConfigAsync()} . + * + * @example samples/V1/NetAppClient/update_kms_config.php + * + * @param UpdateKmsConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateKmsConfig(UpdateKmsConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateKmsConfig', $request, $callOptions)->wait(); + } + + /** + * Updates the settings of a specific replication. + * + * The async variant is {@see NetAppClient::updateReplicationAsync()} . + * + * @example samples/V1/NetAppClient/update_replication.php + * + * @param UpdateReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateReplication(UpdateReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateReplication', $request, $callOptions)->wait(); + } + + /** + * Updates the settings of a specific snapshot. + * + * The async variant is {@see NetAppClient::updateSnapshotAsync()} . + * + * @example samples/V1/NetAppClient/update_snapshot.php + * + * @param UpdateSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSnapshot(UpdateSnapshotRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSnapshot', $request, $callOptions)->wait(); + } + + /** + * Updates the storage pool properties with the full spec + * + * The async variant is {@see NetAppClient::updateStoragePoolAsync()} . + * + * @example samples/V1/NetAppClient/update_storage_pool.php + * + * @param UpdateStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateStoragePool(UpdateStoragePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateStoragePool', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Volume. + * + * The async variant is {@see NetAppClient::updateVolumeAsync()} . + * + * @example samples/V1/NetAppClient/update_volume.php + * + * @param UpdateVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateVolume(UpdateVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateVolume', $request, $callOptions)->wait(); + } + + /** + * Verifies KMS config reachability. + * + * The async variant is {@see NetAppClient::verifyKmsConfigAsync()} . + * + * @example samples/V1/NetAppClient/verify_kms_config.php + * + * @param VerifyKmsConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VerifyKmsConfigResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function verifyKmsConfig(VerifyKmsConfigRequest $request, array $callOptions = []): VerifyKmsConfigResponse + { + return $this->startApiCall('VerifyKmsConfig', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see NetAppClient::getLocationAsync()} . + * + * @example samples/V1/NetAppClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see NetAppClient::listLocationsAsync()} . + * + * @example samples/V1/NetAppClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..3e8c0b03c7b4 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json @@ -0,0 +1,298 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.netapp.v1", + "libraryPackage": "Google\\Cloud\\NetApp\\V1", + "services": { + "NetApp": { + "clients": { + "grpc": { + "libraryClient": "NetAppGapicClient", + "rpcs": { + "CreateActiveDirectory": { + "methods": [ + "createActiveDirectory" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "CreateBackupPolicy": { + "methods": [ + "createBackupPolicy" + ] + }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "CreateKmsConfig": { + "methods": [ + "createKmsConfig" + ] + }, + "CreateReplication": { + "methods": [ + "createReplication" + ] + }, + "CreateSnapshot": { + "methods": [ + "createSnapshot" + ] + }, + "CreateStoragePool": { + "methods": [ + "createStoragePool" + ] + }, + "CreateVolume": { + "methods": [ + "createVolume" + ] + }, + "DeleteActiveDirectory": { + "methods": [ + "deleteActiveDirectory" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "DeleteBackupPolicy": { + "methods": [ + "deleteBackupPolicy" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "DeleteKmsConfig": { + "methods": [ + "deleteKmsConfig" + ] + }, + "DeleteReplication": { + "methods": [ + "deleteReplication" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "DeleteStoragePool": { + "methods": [ + "deleteStoragePool" + ] + }, + "DeleteVolume": { + "methods": [ + "deleteVolume" + ] + }, + "EncryptVolumes": { + "methods": [ + "encryptVolumes" + ] + }, + "EstablishPeering": { + "methods": [ + "establishPeering" + ] + }, + "GetActiveDirectory": { + "methods": [ + "getActiveDirectory" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPolicy": { + "methods": [ + "getBackupPolicy" + ] + }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "GetKmsConfig": { + "methods": [ + "getKmsConfig" + ] + }, + "GetReplication": { + "methods": [ + "getReplication" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "GetStoragePool": { + "methods": [ + "getStoragePool" + ] + }, + "GetVolume": { + "methods": [ + "getVolume" + ] + }, + "ListActiveDirectories": { + "methods": [ + "listActiveDirectories" + ] + }, + "ListBackupPolicies": { + "methods": [ + "listBackupPolicies" + ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults" + ] + }, + "ListBackups": { + "methods": [ + "listBackups" + ] + }, + "ListKmsConfigs": { + "methods": [ + "listKmsConfigs" + ] + }, + "ListReplications": { + "methods": [ + "listReplications" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots" + ] + }, + "ListStoragePools": { + "methods": [ + "listStoragePools" + ] + }, + "ListVolumes": { + "methods": [ + "listVolumes" + ] + }, + "ResumeReplication": { + "methods": [ + "resumeReplication" + ] + }, + "ReverseReplicationDirection": { + "methods": [ + "reverseReplicationDirection" + ] + }, + "RevertVolume": { + "methods": [ + "revertVolume" + ] + }, + "StopReplication": { + "methods": [ + "stopReplication" + ] + }, + "SwitchActiveReplicaZone": { + "methods": [ + "switchActiveReplicaZone" + ] + }, + "SyncReplication": { + "methods": [ + "syncReplication" + ] + }, + "UpdateActiveDirectory": { + "methods": [ + "updateActiveDirectory" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "UpdateBackupPolicy": { + "methods": [ + "updateBackupPolicy" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "UpdateKmsConfig": { + "methods": [ + "updateKmsConfig" + ] + }, + "UpdateReplication": { + "methods": [ + "updateReplication" + ] + }, + "UpdateSnapshot": { + "methods": [ + "updateSnapshot" + ] + }, + "UpdateStoragePool": { + "methods": [ + "updateStoragePool" + ] + }, + "UpdateVolume": { + "methods": [ + "updateVolume" + ] + }, + "VerifyKmsConfig": { + "methods": [ + "verifyKmsConfig" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json new file mode 100644 index 000000000000..3e5b75036741 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json @@ -0,0 +1,324 @@ +{ + "interfaces": { + "google.cloud.netapp.v1.NetApp": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EncryptVolumes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EstablishPeering": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetReplication": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetVolume": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListActiveDirectories": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBackupPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListKmsConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListReplications": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSnapshots": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListStoragePools": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListVolumes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ResumeReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ReverseReplicationDirection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RevertVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SwitchActiveReplicaZone": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SyncReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "VerifyKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php new file mode 100644 index 000000000000..f57b74f7d6d9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php @@ -0,0 +1,1049 @@ + [ + 'google.cloud.netapp.v1.NetApp' => [ + 'CreateActiveDirectory' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\ActiveDirectory', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Backup', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackupPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupPolicy', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackupVault' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupVault', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateKmsConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\KmsConfig', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSnapshot' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Snapshot', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateStoragePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\StoragePool', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Volume', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteActiveDirectory' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupVault' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteKmsConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSnapshot' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteStoragePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EncryptVolumes' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\KmsConfig', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EstablishPeering' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResumeReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ReverseReplicationDirection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RevertVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Volume', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SwitchActiveReplicaZone' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\StoragePool', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SyncReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateActiveDirectory' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\ActiveDirectory', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'active_directory.name', + 'fieldAccessors' => [ + 'getActiveDirectory', + 'getName', + ], + ], + ], + ], + 'UpdateBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Backup', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'backup.name', + 'fieldAccessors' => [ + 'getBackup', + 'getName', + ], + ], + ], + ], + 'UpdateBackupPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupPolicy', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'backup_policy.name', + 'fieldAccessors' => [ + 'getBackupPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateBackupVault' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupVault', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'backup_vault.name', + 'fieldAccessors' => [ + 'getBackupVault', + 'getName', + ], + ], + ], + ], + 'UpdateKmsConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\KmsConfig', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'kms_config.name', + 'fieldAccessors' => [ + 'getKmsConfig', + 'getName', + ], + ], + ], + ], + 'UpdateReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'replication.name', + 'fieldAccessors' => [ + 'getReplication', + 'getName', + ], + ], + ], + ], + 'UpdateSnapshot' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Snapshot', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'snapshot.name', + 'fieldAccessors' => [ + 'getSnapshot', + 'getName', + ], + ], + ], + ], + 'UpdateStoragePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\StoragePool', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'storage_pool.name', + 'fieldAccessors' => [ + 'getStoragePool', + 'getName', + ], + ], + ], + ], + 'UpdateVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Volume', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'volume.name', + 'fieldAccessors' => [ + 'getVolume', + 'getName', + ], + ], + ], + ], + 'GetActiveDirectory' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ActiveDirectory', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\Backup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\BackupPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupVault' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\BackupVault', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetKmsConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\KmsConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReplication' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\Replication', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSnapshot' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\Snapshot', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetStoragePool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\StoragePool', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVolume' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\Volume', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListActiveDirectories' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getActiveDirectories', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListActiveDirectoriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackupPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackupPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListBackupPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackupVaults' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackupVaults', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListBackupVaultsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListBackupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListKmsConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getKmsConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListKmsConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListReplications' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReplications', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListReplicationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSnapshots' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSnapshots', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListSnapshotsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListStoragePools' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getStoragePools', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListStoragePoolsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVolumes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVolumes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListVolumesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'VerifyKmsConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\VerifyKmsConfigResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'activeDirectory' => 'projects/{project}/locations/{location}/activeDirectories/{active_directory}', + 'backup' => 'projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}', + 'backupPolicy' => 'projects/{project}/locations/{location}/backupPolicies/{backup_policy}', + 'backupVault' => 'projects/{project}/locations/{location}/backupVaults/{backup_vault}', + 'kmsConfig' => 'projects/{project}/locations/{location}/kmsConfigs/{kms_config}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + 'replication' => 'projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}', + 'snapshot' => 'projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}', + 'storagePool' => 'projects/{project}/locations/{location}/storagePools/{storage_pool}', + 'volume' => 'projects/{project}/locations/{location}/volumes/{volume}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php new file mode 100644 index 000000000000..05f75ec17cd5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php @@ -0,0 +1,784 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.netapp.v1.NetApp' => [ + 'CreateActiveDirectory' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/activeDirectories', + 'body' => 'active_directory', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'active_directory_id', + ], + ], + 'CreateBackup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupVaults/*}/backups', + 'body' => 'backup', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backup_id', + ], + ], + 'CreateBackupPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPolicies', + 'body' => 'backup_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backup_policy_id', + ], + ], + 'CreateBackupVault' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupVaults', + 'body' => 'backup_vault', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backup_vault_id', + ], + ], + 'CreateKmsConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/kmsConfigs', + 'body' => 'kms_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'kms_config_id', + ], + ], + 'CreateReplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/replications', + 'body' => 'replication', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'replication_id', + ], + ], + 'CreateSnapshot' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/snapshots', + 'body' => 'snapshot', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'snapshot_id', + ], + ], + 'CreateStoragePool' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/storagePools', + 'body' => 'storage_pool', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'storage_pool_id', + ], + ], + 'CreateVolume' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/volumes', + 'body' => 'volume', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'volume_id', + ], + ], + 'DeleteActiveDirectory' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/activeDirectories/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupVault' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteKmsConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReplication' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSnapshot' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteStoragePool' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/storagePools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVolume' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EncryptVolumes' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EstablishPeering' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetActiveDirectory' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/activeDirectories/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupVault' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetKmsConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReplication' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSnapshot' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetStoragePool' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/storagePools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVolume' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListActiveDirectories' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/activeDirectories', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackupPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackupVaults' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupVaults', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupVaults/*}/backups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListKmsConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/kmsConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListReplications' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/replications', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSnapshots' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/snapshots', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListStoragePools' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/storagePools', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVolumes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/volumes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResumeReplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ReverseReplicationDirection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RevertVolume' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*}:revert', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopReplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SwitchActiveReplicaZone' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/storagePools/*}:switch', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SyncReplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateActiveDirectory' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}', + 'body' => 'active_directory', + 'placeholders' => [ + 'active_directory.name' => [ + 'getters' => [ + 'getActiveDirectory', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateBackup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}', + 'body' => 'backup', + 'placeholders' => [ + 'backup.name' => [ + 'getters' => [ + 'getBackup', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateBackupPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}', + 'body' => 'backup_policy', + 'placeholders' => [ + 'backup_policy.name' => [ + 'getters' => [ + 'getBackupPolicy', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateBackupVault' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}', + 'body' => 'backup_vault', + 'placeholders' => [ + 'backup_vault.name' => [ + 'getters' => [ + 'getBackupVault', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateKmsConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}', + 'body' => 'kms_config', + 'placeholders' => [ + 'kms_config.name' => [ + 'getters' => [ + 'getKmsConfig', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateReplication' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}', + 'body' => 'replication', + 'placeholders' => [ + 'replication.name' => [ + 'getters' => [ + 'getReplication', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSnapshot' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}', + 'body' => 'snapshot', + 'placeholders' => [ + 'snapshot.name' => [ + 'getters' => [ + 'getSnapshot', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateStoragePool' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}', + 'body' => 'storage_pool', + 'placeholders' => [ + 'storage_pool.name' => [ + 'getters' => [ + 'getStoragePool', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateVolume' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{volume.name=projects/*/locations/*/volumes/*}', + 'body' => 'volume', + 'placeholders' => [ + 'volume.name' => [ + 'getters' => [ + 'getVolume', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'VerifyKmsConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php b/owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php new file mode 100644 index 000000000000..3f2bd4899e0d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php @@ -0,0 +1,6873 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NetAppClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NetAppClient($options); + } + + /** @test */ + public function createActiveDirectoryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domain = 'domain-1326197564'; + $site = 'site3530567'; + $dns = 'dns99625'; + $netBiosPrefix = 'netBiosPrefix865554756'; + $organizationalUnit = 'organizationalUnit-694432635'; + $aesEncryption = false; + $username = 'username-265713450'; + $password = 'password1216985755'; + $kdcHostname = 'kdcHostname-863813976'; + $kdcIp = 'kdcIp-1136252068'; + $nfsUsersWithLdap = false; + $description = 'description-1724546052'; + $ldapSigning = false; + $encryptDcConnections = false; + $stateDetails = 'stateDetails632437908'; + $expectedResponse = new ActiveDirectory(); + $expectedResponse->setName($name); + $expectedResponse->setDomain($domain); + $expectedResponse->setSite($site); + $expectedResponse->setDns($dns); + $expectedResponse->setNetBiosPrefix($netBiosPrefix); + $expectedResponse->setOrganizationalUnit($organizationalUnit); + $expectedResponse->setAesEncryption($aesEncryption); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $expectedResponse->setKdcHostname($kdcHostname); + $expectedResponse->setKdcIp($kdcIp); + $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); + $expectedResponse->setDescription($description); + $expectedResponse->setLdapSigning($ldapSigning); + $expectedResponse->setEncryptDcConnections($encryptDcConnections); + $expectedResponse->setStateDetails($stateDetails); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createActiveDirectoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $activeDirectory = new ActiveDirectory(); + $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; + $activeDirectory->setDomain($activeDirectoryDomain); + $activeDirectoryDns = 'activeDirectoryDns1090270626'; + $activeDirectory->setDns($activeDirectoryDns); + $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; + $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); + $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; + $activeDirectory->setUsername($activeDirectoryUsername); + $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; + $activeDirectory->setPassword($activeDirectoryPassword); + $activeDirectoryId = 'activeDirectoryId1363092678'; + $request = (new CreateActiveDirectoryRequest()) + ->setParent($formattedParent) + ->setActiveDirectory($activeDirectory) + ->setActiveDirectoryId($activeDirectoryId); + $response = $gapicClient->createActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateActiveDirectory', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getActiveDirectory(); + $this->assertProtobufEquals($activeDirectory, $actualValue); + $actualValue = $actualApiRequestObject->getActiveDirectoryId(); + $this->assertProtobufEquals($activeDirectoryId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createActiveDirectoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createActiveDirectoryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $activeDirectory = new ActiveDirectory(); + $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; + $activeDirectory->setDomain($activeDirectoryDomain); + $activeDirectoryDns = 'activeDirectoryDns1090270626'; + $activeDirectory->setDns($activeDirectoryDns); + $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; + $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); + $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; + $activeDirectory->setUsername($activeDirectoryUsername); + $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; + $activeDirectory->setPassword($activeDirectoryPassword); + $activeDirectoryId = 'activeDirectoryId1363092678'; + $request = (new CreateActiveDirectoryRequest()) + ->setParent($formattedParent) + ->setActiveDirectory($activeDirectory) + ->setActiveDirectoryId($activeDirectoryId); + $response = $gapicClient->createActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createActiveDirectoryTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $volumeUsageBytes = 962433704; + $sourceVolume = 'sourceVolume327497662'; + $sourceSnapshot = 'sourceSnapshot-947679896'; + $chainStorageBytes = 1614651561; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setVolumeUsageBytes($volumeUsageBytes); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setSourceSnapshot($sourceSnapshot); + $expectedResponse->setChainStorageBytes($chainStorageBytes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBackupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $backupId = 'backupId1355353272'; + $backup = new Backup(); + $request = (new CreateBackupRequest()) + ->setParent($formattedParent) + ->setBackupId($backupId) + ->setBackup($backup); + $response = $gapicClient->createBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackupId(); + $this->assertProtobufEquals($backupId, $actualValue); + $actualValue = $actualApiRequestObject->getBackup(); + $this->assertProtobufEquals($backup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $backupId = 'backupId1355353272'; + $backup = new Backup(); + $request = (new CreateBackupRequest()) + ->setParent($formattedParent) + ->setBackupId($backupId) + ->setBackup($backup); + $response = $gapicClient->createBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $dailyBackupLimit = 532629348; + $weeklyBackupLimit = 2075144708; + $monthlyBackupLimit = 1253809680; + $description = 'description-1724546052'; + $enabled = false; + $assignedVolumeCount = 396892795; + $expectedResponse = new BackupPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDailyBackupLimit($dailyBackupLimit); + $expectedResponse->setWeeklyBackupLimit($weeklyBackupLimit); + $expectedResponse->setMonthlyBackupLimit($monthlyBackupLimit); + $expectedResponse->setDescription($description); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setAssignedVolumeCount($assignedVolumeCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBackupPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backupPolicy = new BackupPolicy(); + $backupPolicyId = 'backupPolicyId-1316025077'; + $request = (new CreateBackupPolicyRequest()) + ->setParent($formattedParent) + ->setBackupPolicy($backupPolicy) + ->setBackupPolicyId($backupPolicyId); + $response = $gapicClient->createBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateBackupPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackupPolicy(); + $this->assertProtobufEquals($backupPolicy, $actualValue); + $actualValue = $actualApiRequestObject->getBackupPolicyId(); + $this->assertProtobufEquals($backupPolicyId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backupPolicy = new BackupPolicy(); + $backupPolicyId = 'backupPolicyId-1316025077'; + $request = (new CreateBackupPolicyRequest()) + ->setParent($formattedParent) + ->setBackupPolicy($backupPolicy) + ->setBackupPolicyId($backupPolicyId); + $response = $gapicClient->createBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupVaultTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new BackupVault(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBackupVaultTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backupVaultId = 'backupVaultId467030053'; + $backupVault = new BackupVault(); + $request = (new CreateBackupVaultRequest()) + ->setParent($formattedParent) + ->setBackupVaultId($backupVaultId) + ->setBackupVault($backupVault); + $response = $gapicClient->createBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateBackupVault', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackupVaultId(); + $this->assertProtobufEquals($backupVaultId, $actualValue); + $actualValue = $actualApiRequestObject->getBackupVault(); + $this->assertProtobufEquals($backupVault, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupVaultTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupVaultExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backupVaultId = 'backupVaultId467030053'; + $backupVault = new BackupVault(); + $request = (new CreateBackupVaultRequest()) + ->setParent($formattedParent) + ->setBackupVaultId($backupVaultId) + ->setBackupVault($backupVault); + $response = $gapicClient->createBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupVaultTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createKmsConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $instructions = 'instructions757376421'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new KmsConfig(); + $expectedResponse->setName($name); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setInstructions($instructions); + $expectedResponse->setServiceAccount($serviceAccount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createKmsConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $kmsConfigId = 'kmsConfigId1366390730'; + $kmsConfig = new KmsConfig(); + $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; + $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new CreateKmsConfigRequest()) + ->setParent($formattedParent) + ->setKmsConfigId($kmsConfigId) + ->setKmsConfig($kmsConfig); + $response = $gapicClient->createKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateKmsConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getKmsConfigId(); + $this->assertProtobufEquals($kmsConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getKmsConfig(); + $this->assertProtobufEquals($kmsConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createKmsConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createKmsConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $kmsConfigId = 'kmsConfigId1366390730'; + $kmsConfig = new KmsConfig(); + $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; + $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new CreateKmsConfigRequest()) + ->setParent($formattedParent) + ->setKmsConfigId($kmsConfigId) + ->setKmsConfig($kmsConfig); + $response = $gapicClient->createKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createKmsConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $replication = new Replication(); + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $replication->setReplicationSchedule($replicationReplicationSchedule); + $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); + $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); + $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $replicationId = 'replicationId1935722094'; + $request = (new CreateReplicationRequest()) + ->setParent($formattedParent) + ->setReplication($replication) + ->setReplicationId($replicationId); + $response = $gapicClient->createReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getReplication(); + $this->assertProtobufEquals($replication, $actualValue); + $actualValue = $actualApiRequestObject->getReplicationId(); + $this->assertProtobufEquals($replicationId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $replication = new Replication(); + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $replication->setReplicationSchedule($replicationReplicationSchedule); + $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); + $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); + $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $replicationId = 'replicationId1935722094'; + $request = (new CreateReplicationRequest()) + ->setParent($formattedParent) + ->setReplication($replication) + ->setReplicationId($replicationId); + $response = $gapicClient->createReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSnapshotTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $usedBytes = -1.91584322E8; + $expectedResponse = new Snapshot(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setUsedBytes($usedBytes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSnapshotTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshot = new Snapshot(); + $snapshotId = 'snapshotId-168585866'; + $request = (new CreateSnapshotRequest()) + ->setParent($formattedParent) + ->setSnapshot($snapshot) + ->setSnapshotId($snapshotId); + $response = $gapicClient->createSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateSnapshot', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSnapshot(); + $this->assertProtobufEquals($snapshot, $actualValue); + $actualValue = $actualApiRequestObject->getSnapshotId(); + $this->assertProtobufEquals($snapshotId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSnapshotTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSnapshotExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshot = new Snapshot(); + $snapshotId = 'snapshotId-168585866'; + $request = (new CreateSnapshotRequest()) + ->setParent($formattedParent) + ->setSnapshot($snapshot) + ->setSnapshotId($snapshotId); + $response = $gapicClient->createSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSnapshotTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createStoragePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $capacityGib = 498394811; + $volumeCapacityGib = 643777472; + $volumeCount = 1362665558; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $ldapEnabled = false; + $psaRange = 'psaRange1004849276'; + $globalAccessAllowed = false; + $allowAutoTiering = true; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $expectedResponse = new StoragePool(); + $expectedResponse->setName($name); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); + $expectedResponse->setAllowAutoTiering($allowAutoTiering); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createStoragePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $storagePoolId = 'storagePoolId909234778'; + $storagePool = new StoragePool(); + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePool->setServiceLevel($storagePoolServiceLevel); + $storagePoolCapacityGib = 1260910865; + $storagePool->setCapacityGib($storagePoolCapacityGib); + $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $storagePool->setNetwork($storagePoolNetwork); + $request = (new CreateStoragePoolRequest()) + ->setParent($formattedParent) + ->setStoragePoolId($storagePoolId) + ->setStoragePool($storagePool); + $response = $gapicClient->createStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateStoragePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePoolId(); + $this->assertProtobufEquals($storagePoolId, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createStoragePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createStoragePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $storagePoolId = 'storagePoolId909234778'; + $storagePool = new StoragePool(); + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePool->setServiceLevel($storagePoolServiceLevel); + $storagePoolCapacityGib = 1260910865; + $storagePool->setCapacityGib($storagePoolCapacityGib); + $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $storagePool->setNetwork($storagePoolNetwork); + $request = (new CreateStoragePoolRequest()) + ->setParent($formattedParent) + ->setStoragePoolId($storagePoolId) + ->setStoragePool($storagePool); + $response = $gapicClient->createStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createStoragePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createVolumeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $shareName = 'shareName-1788152085'; + $psaRange = 'psaRange1004849276'; + $storagePool = 'storagePool897344352'; + $network = 'network1843485230'; + $capacityGib = 498394811; + $unixPermissions = 'unixPermissions1137975373'; + $description = 'description-1724546052'; + $snapReserve = -1.42958764E8; + $snapshotDirectory = true; + $usedGib = 279083970; + $kerberosEnabled = false; + $ldapEnabled = false; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $hasReplication = false; + $largeCapacity = true; + $multipleEndpoints = false; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $coldTierSizeGib = 212809252; + $expectedResponse = new Volume(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setShareName($shareName); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setStoragePool($storagePool); + $expectedResponse->setNetwork($network); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setUnixPermissions($unixPermissions); + $expectedResponse->setDescription($description); + $expectedResponse->setSnapReserve($snapReserve); + $expectedResponse->setSnapshotDirectory($snapshotDirectory); + $expectedResponse->setUsedGib($usedGib); + $expectedResponse->setKerberosEnabled($kerberosEnabled); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setHasReplication($hasReplication); + $expectedResponse->setLargeCapacity($largeCapacity); + $expectedResponse->setMultipleEndpoints($multipleEndpoints); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $expectedResponse->setColdTierSizeGib($coldTierSizeGib); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $volumeId = 'volumeId-2128282528'; + $volume = new Volume(); + $volumeShareName = 'volumeShareName1564593424'; + $volume->setShareName($volumeShareName); + $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $volume->setStoragePool($volumeStoragePool); + $volumeCapacityGib = 1491387092; + $volume->setCapacityGib($volumeCapacityGib); + $volumeProtocols = []; + $volume->setProtocols($volumeProtocols); + $request = (new CreateVolumeRequest()) + ->setParent($formattedParent) + ->setVolumeId($volumeId) + ->setVolume($volume); + $response = $gapicClient->createVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getVolumeId(); + $this->assertProtobufEquals($volumeId, $actualValue); + $actualValue = $actualApiRequestObject->getVolume(); + $this->assertProtobufEquals($volume, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVolumeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createVolumeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $volumeId = 'volumeId-2128282528'; + $volume = new Volume(); + $volumeShareName = 'volumeShareName1564593424'; + $volume->setShareName($volumeShareName); + $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $volume->setStoragePool($volumeStoragePool); + $volumeCapacityGib = 1491387092; + $volume->setCapacityGib($volumeCapacityGib); + $volumeProtocols = []; + $volume->setProtocols($volumeProtocols); + $request = (new CreateVolumeRequest()) + ->setParent($formattedParent) + ->setVolumeId($volumeId) + ->setVolume($volume); + $response = $gapicClient->createVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVolumeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteActiveDirectoryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteActiveDirectoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + $request = (new DeleteActiveDirectoryRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteActiveDirectory', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteActiveDirectoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteActiveDirectoryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + $request = (new DeleteActiveDirectoryRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteActiveDirectoryTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBackupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBackupPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + $request = (new DeleteBackupPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteBackupPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + $request = (new DeleteBackupPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupVaultTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBackupVaultTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new DeleteBackupVaultRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteBackupVault', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupVaultTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupVaultExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new DeleteBackupVaultRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupVaultTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteKmsConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteKmsConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new DeleteKmsConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteKmsConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteKmsConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteKmsConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new DeleteKmsConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteKmsConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new DeleteReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new DeleteReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSnapshotTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSnapshotTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new DeleteSnapshotRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteSnapshot', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSnapshotTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSnapshotExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new DeleteSnapshotRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSnapshotTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteStoragePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteStoragePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new DeleteStoragePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteStoragePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteStoragePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteStoragePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new DeleteStoragePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteStoragePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteVolumeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new DeleteVolumeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVolumeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteVolumeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new DeleteVolumeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVolumeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function encryptVolumesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/encryptVolumesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $instructions = 'instructions757376421'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new KmsConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setInstructions($instructions); + $expectedResponse->setServiceAccount($serviceAccount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/encryptVolumesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new EncryptVolumesRequest()) + ->setName($formattedName); + $response = $gapicClient->encryptVolumes($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/EncryptVolumes', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/encryptVolumesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function encryptVolumesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/encryptVolumesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new EncryptVolumesRequest()) + ->setName($formattedName); + $response = $gapicClient->encryptVolumes($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/encryptVolumesTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function establishPeeringTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/establishPeeringTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/establishPeeringTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $peerClusterName = 'peerClusterName-1759308435'; + $peerSvmName = 'peerSvmName-1166928515'; + $peerVolumeName = 'peerVolumeName486635827'; + $request = (new EstablishPeeringRequest()) + ->setName($formattedName) + ->setPeerClusterName($peerClusterName) + ->setPeerSvmName($peerSvmName) + ->setPeerVolumeName($peerVolumeName); + $response = $gapicClient->establishPeering($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/EstablishPeering', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getPeerClusterName(); + $this->assertProtobufEquals($peerClusterName, $actualValue); + $actualValue = $actualApiRequestObject->getPeerSvmName(); + $this->assertProtobufEquals($peerSvmName, $actualValue); + $actualValue = $actualApiRequestObject->getPeerVolumeName(); + $this->assertProtobufEquals($peerVolumeName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/establishPeeringTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function establishPeeringExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/establishPeeringTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $peerClusterName = 'peerClusterName-1759308435'; + $peerSvmName = 'peerSvmName-1166928515'; + $peerVolumeName = 'peerVolumeName486635827'; + $request = (new EstablishPeeringRequest()) + ->setName($formattedName) + ->setPeerClusterName($peerClusterName) + ->setPeerSvmName($peerSvmName) + ->setPeerVolumeName($peerVolumeName); + $response = $gapicClient->establishPeering($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/establishPeeringTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getActiveDirectoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $domain = 'domain-1326197564'; + $site = 'site3530567'; + $dns = 'dns99625'; + $netBiosPrefix = 'netBiosPrefix865554756'; + $organizationalUnit = 'organizationalUnit-694432635'; + $aesEncryption = false; + $username = 'username-265713450'; + $password = 'password1216985755'; + $kdcHostname = 'kdcHostname-863813976'; + $kdcIp = 'kdcIp-1136252068'; + $nfsUsersWithLdap = false; + $description = 'description-1724546052'; + $ldapSigning = false; + $encryptDcConnections = false; + $stateDetails = 'stateDetails632437908'; + $expectedResponse = new ActiveDirectory(); + $expectedResponse->setName($name2); + $expectedResponse->setDomain($domain); + $expectedResponse->setSite($site); + $expectedResponse->setDns($dns); + $expectedResponse->setNetBiosPrefix($netBiosPrefix); + $expectedResponse->setOrganizationalUnit($organizationalUnit); + $expectedResponse->setAesEncryption($aesEncryption); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $expectedResponse->setKdcHostname($kdcHostname); + $expectedResponse->setKdcIp($kdcIp); + $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); + $expectedResponse->setDescription($description); + $expectedResponse->setLdapSigning($ldapSigning); + $expectedResponse->setEncryptDcConnections($encryptDcConnections); + $expectedResponse->setStateDetails($stateDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + $request = (new GetActiveDirectoryRequest()) + ->setName($formattedName); + $response = $gapicClient->getActiveDirectory($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetActiveDirectory', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getActiveDirectoryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + $request = (new GetActiveDirectoryRequest()) + ->setName($formattedName); + try { + $gapicClient->getActiveDirectory($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $volumeUsageBytes = 962433704; + $sourceVolume = 'sourceVolume327497662'; + $sourceSnapshot = 'sourceSnapshot-947679896'; + $chainStorageBytes = 1614651561; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setVolumeUsageBytes($volumeUsageBytes); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setSourceSnapshot($sourceSnapshot); + $expectedResponse->setChainStorageBytes($chainStorageBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dailyBackupLimit = 532629348; + $weeklyBackupLimit = 2075144708; + $monthlyBackupLimit = 1253809680; + $description = 'description-1724546052'; + $enabled = false; + $assignedVolumeCount = 396892795; + $expectedResponse = new BackupPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDailyBackupLimit($dailyBackupLimit); + $expectedResponse->setWeeklyBackupLimit($weeklyBackupLimit); + $expectedResponse->setMonthlyBackupLimit($monthlyBackupLimit); + $expectedResponse->setDescription($description); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setAssignedVolumeCount($assignedVolumeCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + $request = (new GetBackupPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackupPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetBackupPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + $request = (new GetBackupPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackupPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupVaultTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new BackupVault(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new GetBackupVaultRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackupVault($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetBackupVault', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupVaultExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new GetBackupVaultRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackupVault($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKmsConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $instructions = 'instructions757376421'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new KmsConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setInstructions($instructions); + $expectedResponse->setServiceAccount($serviceAccount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new GetKmsConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getKmsConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetKmsConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKmsConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new GetKmsConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getKmsConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReplicationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new GetReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->getReplication($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetReplication', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReplicationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new GetReplicationRequest()) + ->setName($formattedName); + try { + $gapicClient->getReplication($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSnapshotTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $usedBytes = -1.91584322E8; + $expectedResponse = new Snapshot(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setUsedBytes($usedBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new GetSnapshotRequest()) + ->setName($formattedName); + $response = $gapicClient->getSnapshot($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetSnapshot', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSnapshotExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new GetSnapshotRequest()) + ->setName($formattedName); + try { + $gapicClient->getSnapshot($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStoragePoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $capacityGib = 498394811; + $volumeCapacityGib = 643777472; + $volumeCount = 1362665558; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $ldapEnabled = false; + $psaRange = 'psaRange1004849276'; + $globalAccessAllowed = false; + $allowAutoTiering = true; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $expectedResponse = new StoragePool(); + $expectedResponse->setName($name2); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); + $expectedResponse->setAllowAutoTiering($allowAutoTiering); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new GetStoragePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->getStoragePool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetStoragePool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStoragePoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new GetStoragePoolRequest()) + ->setName($formattedName); + try { + $gapicClient->getStoragePool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVolumeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $shareName = 'shareName-1788152085'; + $psaRange = 'psaRange1004849276'; + $storagePool = 'storagePool897344352'; + $network = 'network1843485230'; + $capacityGib = 498394811; + $unixPermissions = 'unixPermissions1137975373'; + $description = 'description-1724546052'; + $snapReserve = -1.42958764E8; + $snapshotDirectory = true; + $usedGib = 279083970; + $kerberosEnabled = false; + $ldapEnabled = false; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $hasReplication = false; + $largeCapacity = true; + $multipleEndpoints = false; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $coldTierSizeGib = 212809252; + $expectedResponse = new Volume(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setShareName($shareName); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setStoragePool($storagePool); + $expectedResponse->setNetwork($network); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setUnixPermissions($unixPermissions); + $expectedResponse->setDescription($description); + $expectedResponse->setSnapReserve($snapReserve); + $expectedResponse->setSnapshotDirectory($snapshotDirectory); + $expectedResponse->setUsedGib($usedGib); + $expectedResponse->setKerberosEnabled($kerberosEnabled); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setHasReplication($hasReplication); + $expectedResponse->setLargeCapacity($largeCapacity); + $expectedResponse->setMultipleEndpoints($multipleEndpoints); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $expectedResponse->setColdTierSizeGib($coldTierSizeGib); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new GetVolumeRequest()) + ->setName($formattedName); + $response = $gapicClient->getVolume($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetVolume', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVolumeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new GetVolumeRequest()) + ->setName($formattedName); + try { + $gapicClient->getVolume($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listActiveDirectoriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $activeDirectoriesElement = new ActiveDirectory(); + $activeDirectories = [ + $activeDirectoriesElement, + ]; + $expectedResponse = new ListActiveDirectoriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setActiveDirectories($activeDirectories); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListActiveDirectoriesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listActiveDirectories($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getActiveDirectories()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListActiveDirectories', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listActiveDirectoriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListActiveDirectoriesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listActiveDirectories($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backupPoliciesElement = new BackupPolicy(); + $backupPolicies = [ + $backupPoliciesElement, + ]; + $expectedResponse = new ListBackupPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackupPolicies($backupPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackupPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackupPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListBackupPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackupPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupVaultsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backupVaultsElement = new BackupVault(); + $backupVaults = [ + $backupVaultsElement, + ]; + $expectedResponse = new ListBackupVaultsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackupVaults($backupVaults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupVaultsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackupVaults($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackupVaults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListBackupVaults', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupVaultsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupVaultsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackupVaults($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backupsElement = new Backup(); + $backups = [ + $backupsElement, + ]; + $expectedResponse = new ListBackupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackups($backups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListBackups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKmsConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $kmsConfigsElement = new KmsConfig(); + $kmsConfigs = [ + $kmsConfigsElement, + ]; + $expectedResponse = new ListKmsConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setKmsConfigs($kmsConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListKmsConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listKmsConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getKmsConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListKmsConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKmsConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListKmsConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listKmsConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReplicationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $replicationsElement = new Replication(); + $replications = [ + $replicationsElement, + ]; + $expectedResponse = new ListReplicationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReplications($replications); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListReplicationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReplications($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReplications()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListReplications', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReplicationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListReplicationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReplications($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSnapshotsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $snapshotsElement = new Snapshot(); + $snapshots = [ + $snapshotsElement, + ]; + $expectedResponse = new ListSnapshotsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSnapshots($snapshots); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListSnapshotsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSnapshots($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListSnapshots', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSnapshotsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListSnapshotsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSnapshots($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listStoragePoolsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $storagePoolsElement = new StoragePool(); + $storagePools = [ + $storagePoolsElement, + ]; + $expectedResponse = new ListStoragePoolsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setStoragePools($storagePools); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListStoragePoolsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listStoragePools($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getStoragePools()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListStoragePools', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listStoragePoolsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListStoragePoolsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listStoragePools($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVolumesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $volumesElement = new Volume(); + $volumes = [ + $volumesElement, + ]; + $expectedResponse = new ListVolumesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVolumes($volumes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListVolumesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVolumes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVolumes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListVolumes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVolumesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListVolumesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVolumes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resumeReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resumeReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new ResumeReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->resumeReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ResumeReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resumeReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resumeReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resumeReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new ResumeReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->resumeReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resumeReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reverseReplicationDirectionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reverseReplicationDirectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reverseReplicationDirectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new ReverseReplicationDirectionRequest()) + ->setName($formattedName); + $response = $gapicClient->reverseReplicationDirection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ReverseReplicationDirection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reverseReplicationDirectionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reverseReplicationDirectionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reverseReplicationDirectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new ReverseReplicationDirectionRequest()) + ->setName($formattedName); + $response = $gapicClient->reverseReplicationDirection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reverseReplicationDirectionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function revertVolumeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/revertVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $shareName = 'shareName-1788152085'; + $psaRange = 'psaRange1004849276'; + $storagePool = 'storagePool897344352'; + $network = 'network1843485230'; + $capacityGib = 498394811; + $unixPermissions = 'unixPermissions1137975373'; + $description = 'description-1724546052'; + $snapReserve = -1.42958764E8; + $snapshotDirectory = true; + $usedGib = 279083970; + $kerberosEnabled = false; + $ldapEnabled = false; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $hasReplication = false; + $largeCapacity = true; + $multipleEndpoints = false; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $coldTierSizeGib = 212809252; + $expectedResponse = new Volume(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setShareName($shareName); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setStoragePool($storagePool); + $expectedResponse->setNetwork($network); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setUnixPermissions($unixPermissions); + $expectedResponse->setDescription($description); + $expectedResponse->setSnapReserve($snapReserve); + $expectedResponse->setSnapshotDirectory($snapshotDirectory); + $expectedResponse->setUsedGib($usedGib); + $expectedResponse->setKerberosEnabled($kerberosEnabled); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setHasReplication($hasReplication); + $expectedResponse->setLargeCapacity($largeCapacity); + $expectedResponse->setMultipleEndpoints($multipleEndpoints); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $expectedResponse->setColdTierSizeGib($coldTierSizeGib); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/revertVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshotId = 'snapshotId-168585866'; + $request = (new RevertVolumeRequest()) + ->setName($formattedName) + ->setSnapshotId($snapshotId); + $response = $gapicClient->revertVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/RevertVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getSnapshotId(); + $this->assertProtobufEquals($snapshotId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/revertVolumeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function revertVolumeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/revertVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshotId = 'snapshotId-168585866'; + $request = (new RevertVolumeRequest()) + ->setName($formattedName) + ->setSnapshotId($snapshotId); + $response = $gapicClient->revertVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/revertVolumeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new StopReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->stopReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/StopReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new StopReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->stopReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function switchActiveReplicaZoneTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/switchActiveReplicaZoneTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $capacityGib = 498394811; + $volumeCapacityGib = 643777472; + $volumeCount = 1362665558; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $ldapEnabled = false; + $psaRange = 'psaRange1004849276'; + $globalAccessAllowed = false; + $allowAutoTiering = true; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $expectedResponse = new StoragePool(); + $expectedResponse->setName($name2); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); + $expectedResponse->setAllowAutoTiering($allowAutoTiering); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/switchActiveReplicaZoneTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new SwitchActiveReplicaZoneRequest()) + ->setName($formattedName); + $response = $gapicClient->switchActiveReplicaZone($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/SwitchActiveReplicaZone', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/switchActiveReplicaZoneTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function switchActiveReplicaZoneExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/switchActiveReplicaZoneTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new SwitchActiveReplicaZoneRequest()) + ->setName($formattedName); + $response = $gapicClient->switchActiveReplicaZone($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/switchActiveReplicaZoneTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function syncReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/syncReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/syncReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new SyncReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->syncReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/SyncReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/syncReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function syncReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/syncReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new SyncReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->syncReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/syncReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateActiveDirectoryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domain = 'domain-1326197564'; + $site = 'site3530567'; + $dns = 'dns99625'; + $netBiosPrefix = 'netBiosPrefix865554756'; + $organizationalUnit = 'organizationalUnit-694432635'; + $aesEncryption = false; + $username = 'username-265713450'; + $password = 'password1216985755'; + $kdcHostname = 'kdcHostname-863813976'; + $kdcIp = 'kdcIp-1136252068'; + $nfsUsersWithLdap = false; + $description = 'description-1724546052'; + $ldapSigning = false; + $encryptDcConnections = false; + $stateDetails = 'stateDetails632437908'; + $expectedResponse = new ActiveDirectory(); + $expectedResponse->setName($name); + $expectedResponse->setDomain($domain); + $expectedResponse->setSite($site); + $expectedResponse->setDns($dns); + $expectedResponse->setNetBiosPrefix($netBiosPrefix); + $expectedResponse->setOrganizationalUnit($organizationalUnit); + $expectedResponse->setAesEncryption($aesEncryption); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $expectedResponse->setKdcHostname($kdcHostname); + $expectedResponse->setKdcIp($kdcIp); + $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); + $expectedResponse->setDescription($description); + $expectedResponse->setLdapSigning($ldapSigning); + $expectedResponse->setEncryptDcConnections($encryptDcConnections); + $expectedResponse->setStateDetails($stateDetails); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateActiveDirectoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $activeDirectory = new ActiveDirectory(); + $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; + $activeDirectory->setDomain($activeDirectoryDomain); + $activeDirectoryDns = 'activeDirectoryDns1090270626'; + $activeDirectory->setDns($activeDirectoryDns); + $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; + $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); + $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; + $activeDirectory->setUsername($activeDirectoryUsername); + $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; + $activeDirectory->setPassword($activeDirectoryPassword); + $request = (new UpdateActiveDirectoryRequest()) + ->setUpdateMask($updateMask) + ->setActiveDirectory($activeDirectory); + $response = $gapicClient->updateActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateActiveDirectory', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getActiveDirectory(); + $this->assertProtobufEquals($activeDirectory, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateActiveDirectoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateActiveDirectoryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $activeDirectory = new ActiveDirectory(); + $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; + $activeDirectory->setDomain($activeDirectoryDomain); + $activeDirectoryDns = 'activeDirectoryDns1090270626'; + $activeDirectory->setDns($activeDirectoryDns); + $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; + $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); + $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; + $activeDirectory->setUsername($activeDirectoryUsername); + $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; + $activeDirectory->setPassword($activeDirectoryPassword); + $request = (new UpdateActiveDirectoryRequest()) + ->setUpdateMask($updateMask) + ->setActiveDirectory($activeDirectory); + $response = $gapicClient->updateActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateActiveDirectoryTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $volumeUsageBytes = 962433704; + $sourceVolume = 'sourceVolume327497662'; + $sourceSnapshot = 'sourceSnapshot-947679896'; + $chainStorageBytes = 1614651561; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setVolumeUsageBytes($volumeUsageBytes); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setSourceSnapshot($sourceSnapshot); + $expectedResponse->setChainStorageBytes($chainStorageBytes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBackupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $backup = new Backup(); + $request = (new UpdateBackupRequest()) + ->setUpdateMask($updateMask) + ->setBackup($backup); + $response = $gapicClient->updateBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getBackup(); + $this->assertProtobufEquals($backup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $backup = new Backup(); + $request = (new UpdateBackupRequest()) + ->setUpdateMask($updateMask) + ->setBackup($backup); + $response = $gapicClient->updateBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $dailyBackupLimit = 532629348; + $weeklyBackupLimit = 2075144708; + $monthlyBackupLimit = 1253809680; + $description = 'description-1724546052'; + $enabled = false; + $assignedVolumeCount = 396892795; + $expectedResponse = new BackupPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDailyBackupLimit($dailyBackupLimit); + $expectedResponse->setWeeklyBackupLimit($weeklyBackupLimit); + $expectedResponse->setMonthlyBackupLimit($monthlyBackupLimit); + $expectedResponse->setDescription($description); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setAssignedVolumeCount($assignedVolumeCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBackupPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $backupPolicy = new BackupPolicy(); + $request = (new UpdateBackupPolicyRequest()) + ->setUpdateMask($updateMask) + ->setBackupPolicy($backupPolicy); + $response = $gapicClient->updateBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateBackupPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getBackupPolicy(); + $this->assertProtobufEquals($backupPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $backupPolicy = new BackupPolicy(); + $request = (new UpdateBackupPolicyRequest()) + ->setUpdateMask($updateMask) + ->setBackupPolicy($backupPolicy); + $response = $gapicClient->updateBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupVaultTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new BackupVault(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBackupVaultTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $backupVault = new BackupVault(); + $request = (new UpdateBackupVaultRequest()) + ->setUpdateMask($updateMask) + ->setBackupVault($backupVault); + $response = $gapicClient->updateBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateBackupVault', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getBackupVault(); + $this->assertProtobufEquals($backupVault, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupVaultTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupVaultExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $backupVault = new BackupVault(); + $request = (new UpdateBackupVaultRequest()) + ->setUpdateMask($updateMask) + ->setBackupVault($backupVault); + $response = $gapicClient->updateBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupVaultTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateKmsConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $instructions = 'instructions757376421'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new KmsConfig(); + $expectedResponse->setName($name); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setInstructions($instructions); + $expectedResponse->setServiceAccount($serviceAccount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateKmsConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $kmsConfig = new KmsConfig(); + $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; + $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new UpdateKmsConfigRequest()) + ->setUpdateMask($updateMask) + ->setKmsConfig($kmsConfig); + $response = $gapicClient->updateKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateKmsConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getKmsConfig(); + $this->assertProtobufEquals($kmsConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateKmsConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateKmsConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $kmsConfig = new KmsConfig(); + $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; + $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new UpdateKmsConfigRequest()) + ->setUpdateMask($updateMask) + ->setKmsConfig($kmsConfig); + $response = $gapicClient->updateKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateKmsConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $replication = new Replication(); + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $replication->setReplicationSchedule($replicationReplicationSchedule); + $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); + $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); + $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $request = (new UpdateReplicationRequest()) + ->setUpdateMask($updateMask) + ->setReplication($replication); + $response = $gapicClient->updateReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getReplication(); + $this->assertProtobufEquals($replication, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $replication = new Replication(); + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $replication->setReplicationSchedule($replicationReplicationSchedule); + $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); + $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); + $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $request = (new UpdateReplicationRequest()) + ->setUpdateMask($updateMask) + ->setReplication($replication); + $response = $gapicClient->updateReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSnapshotTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $usedBytes = -1.91584322E8; + $expectedResponse = new Snapshot(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setUsedBytes($usedBytes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSnapshotTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $snapshot = new Snapshot(); + $request = (new UpdateSnapshotRequest()) + ->setUpdateMask($updateMask) + ->setSnapshot($snapshot); + $response = $gapicClient->updateSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateSnapshot', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getSnapshot(); + $this->assertProtobufEquals($snapshot, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSnapshotTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSnapshotExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $snapshot = new Snapshot(); + $request = (new UpdateSnapshotRequest()) + ->setUpdateMask($updateMask) + ->setSnapshot($snapshot); + $response = $gapicClient->updateSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSnapshotTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateStoragePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $capacityGib = 498394811; + $volumeCapacityGib = 643777472; + $volumeCount = 1362665558; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $ldapEnabled = false; + $psaRange = 'psaRange1004849276'; + $globalAccessAllowed = false; + $allowAutoTiering = true; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $expectedResponse = new StoragePool(); + $expectedResponse->setName($name); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); + $expectedResponse->setAllowAutoTiering($allowAutoTiering); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateStoragePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $storagePool = new StoragePool(); + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePool->setServiceLevel($storagePoolServiceLevel); + $storagePoolCapacityGib = 1260910865; + $storagePool->setCapacityGib($storagePoolCapacityGib); + $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $storagePool->setNetwork($storagePoolNetwork); + $request = (new UpdateStoragePoolRequest()) + ->setUpdateMask($updateMask) + ->setStoragePool($storagePool); + $response = $gapicClient->updateStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateStoragePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateStoragePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateStoragePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $storagePool = new StoragePool(); + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePool->setServiceLevel($storagePoolServiceLevel); + $storagePoolCapacityGib = 1260910865; + $storagePool->setCapacityGib($storagePoolCapacityGib); + $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $storagePool->setNetwork($storagePoolNetwork); + $request = (new UpdateStoragePoolRequest()) + ->setUpdateMask($updateMask) + ->setStoragePool($storagePool); + $response = $gapicClient->updateStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateStoragePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateVolumeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $shareName = 'shareName-1788152085'; + $psaRange = 'psaRange1004849276'; + $storagePool = 'storagePool897344352'; + $network = 'network1843485230'; + $capacityGib = 498394811; + $unixPermissions = 'unixPermissions1137975373'; + $description = 'description-1724546052'; + $snapReserve = -1.42958764E8; + $snapshotDirectory = true; + $usedGib = 279083970; + $kerberosEnabled = false; + $ldapEnabled = false; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $hasReplication = false; + $largeCapacity = true; + $multipleEndpoints = false; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $coldTierSizeGib = 212809252; + $expectedResponse = new Volume(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setShareName($shareName); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setStoragePool($storagePool); + $expectedResponse->setNetwork($network); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setUnixPermissions($unixPermissions); + $expectedResponse->setDescription($description); + $expectedResponse->setSnapReserve($snapReserve); + $expectedResponse->setSnapshotDirectory($snapshotDirectory); + $expectedResponse->setUsedGib($usedGib); + $expectedResponse->setKerberosEnabled($kerberosEnabled); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setHasReplication($hasReplication); + $expectedResponse->setLargeCapacity($largeCapacity); + $expectedResponse->setMultipleEndpoints($multipleEndpoints); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $expectedResponse->setColdTierSizeGib($coldTierSizeGib); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $volume = new Volume(); + $volumeShareName = 'volumeShareName1564593424'; + $volume->setShareName($volumeShareName); + $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $volume->setStoragePool($volumeStoragePool); + $volumeCapacityGib = 1491387092; + $volume->setCapacityGib($volumeCapacityGib); + $volumeProtocols = []; + $volume->setProtocols($volumeProtocols); + $request = (new UpdateVolumeRequest()) + ->setUpdateMask($updateMask) + ->setVolume($volume); + $response = $gapicClient->updateVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getVolume(); + $this->assertProtobufEquals($volume, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVolumeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateVolumeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $volume = new Volume(); + $volumeShareName = 'volumeShareName1564593424'; + $volume->setShareName($volumeShareName); + $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $volume->setStoragePool($volumeStoragePool); + $volumeCapacityGib = 1491387092; + $volume->setCapacityGib($volumeCapacityGib); + $volumeProtocols = []; + $volume->setProtocols($volumeProtocols); + $request = (new UpdateVolumeRequest()) + ->setUpdateMask($updateMask) + ->setVolume($volume); + $response = $gapicClient->updateVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVolumeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function verifyKmsConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $healthy = false; + $healthError = 'healthError847905381'; + $instructions = 'instructions757376421'; + $expectedResponse = new VerifyKmsConfigResponse(); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setHealthError($healthError); + $expectedResponse->setInstructions($instructions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new VerifyKmsConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->verifyKmsConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/VerifyKmsConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyKmsConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new VerifyKmsConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->verifyKmsConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createActiveDirectoryAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domain = 'domain-1326197564'; + $site = 'site3530567'; + $dns = 'dns99625'; + $netBiosPrefix = 'netBiosPrefix865554756'; + $organizationalUnit = 'organizationalUnit-694432635'; + $aesEncryption = false; + $username = 'username-265713450'; + $password = 'password1216985755'; + $kdcHostname = 'kdcHostname-863813976'; + $kdcIp = 'kdcIp-1136252068'; + $nfsUsersWithLdap = false; + $description = 'description-1724546052'; + $ldapSigning = false; + $encryptDcConnections = false; + $stateDetails = 'stateDetails632437908'; + $expectedResponse = new ActiveDirectory(); + $expectedResponse->setName($name); + $expectedResponse->setDomain($domain); + $expectedResponse->setSite($site); + $expectedResponse->setDns($dns); + $expectedResponse->setNetBiosPrefix($netBiosPrefix); + $expectedResponse->setOrganizationalUnit($organizationalUnit); + $expectedResponse->setAesEncryption($aesEncryption); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $expectedResponse->setKdcHostname($kdcHostname); + $expectedResponse->setKdcIp($kdcIp); + $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); + $expectedResponse->setDescription($description); + $expectedResponse->setLdapSigning($ldapSigning); + $expectedResponse->setEncryptDcConnections($encryptDcConnections); + $expectedResponse->setStateDetails($stateDetails); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createActiveDirectoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $activeDirectory = new ActiveDirectory(); + $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; + $activeDirectory->setDomain($activeDirectoryDomain); + $activeDirectoryDns = 'activeDirectoryDns1090270626'; + $activeDirectory->setDns($activeDirectoryDns); + $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; + $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); + $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; + $activeDirectory->setUsername($activeDirectoryUsername); + $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; + $activeDirectory->setPassword($activeDirectoryPassword); + $activeDirectoryId = 'activeDirectoryId1363092678'; + $request = (new CreateActiveDirectoryRequest()) + ->setParent($formattedParent) + ->setActiveDirectory($activeDirectory) + ->setActiveDirectoryId($activeDirectoryId); + $response = $gapicClient->createActiveDirectoryAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateActiveDirectory', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getActiveDirectory(); + $this->assertProtobufEquals($activeDirectory, $actualValue); + $actualValue = $actualApiRequestObject->getActiveDirectoryId(); + $this->assertProtobufEquals($activeDirectoryId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createActiveDirectoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +}