8000 feat: [google-cloud-netapp] A new message 'google.cloud.netapp.v1.BackupRetentionPolicy' is added in 'google.cloud.netapp.v1.BackupVault' by gcf-owl-bot[bot] · Pull Request #13916 · googleapis/google-cloud-python · GitHub
[go: up one dir, main page]

Skip to content

feat: [google-cloud-netapp] A new message 'google.cloud.netapp.v1.BackupRetentionPolicy' is added in 'google.cloud.netapp.v1.BackupVault' #13916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.22" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.22" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ class Backup(proto.Message):
backup_region (str):
Output only. Region in which backup is stored. Format:
``projects/{project_id}/locations/{location}``
enforced_retention_end_time (google.protobuf.timestamp_pb2.Timestamp):
Output only. The time until which the backup
is not deletable.
"""

class State(proto.Enum):
Expand Down Expand Up @@ -201,6 +204,11 @@ class Type(proto.Enum):
proto.STRING,
number=14,
)
enforced_retention_end_time: timestamp_pb2.Timestamp = proto.Field(
proto.MESSAGE,
number=15,
message=timestamp_pb2.Timestamp,
)


class ListBackupsRequest(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ class BackupVault(proto.Message):
Output only. Name of the Backup vault created in backup
region. Format:
``projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}``
backup_retention_policy (google.cloud.netapp_v1.types.BackupVault.BackupRetentionPolicy):
Optional. Backup retention policy defining
the retenton of backups.
"""

class State(proto.Enum):
Expand Down Expand Up @@ -109,6 +112,56 @@ class BackupVaultType(proto.Enum):
IN_REGION = 1
CROSS_REGION = 2

class BackupRetentionPolicy(proto.Message):
r"""Retention policy for backups in the backup vault

Attributes:
backup_minimum_enforced_retention_days (int):
Required. Minimum retention duration in days
for backups in the backup vault.
daily_backup_immutable (bool):
Optional. Indicates if the daily backups are immutable.
Atleast one of daily_backup_immutable,
weekly_backup_immutable, monthly_backup_immutable and
manual_backup_immutable must be true.
weekly_backup_immutable (bool):
Optional. Indicates if the weekly backups are immutable.
Atleast one of daily_backup_immutable,
weekly_backup_immutable, monthly_backup_immutable and
manual_backup_immutable must be true.
monthly_backup_immutable (bool):
Optional. Indicates if the monthly backups are immutable.
Atleast one of daily_backup_immutable,
weekly_backup_immutable, monthly_backup_immutable and
manual_backup_immutable must be true.
manual_backup_immutable (bool):
Optional. Indicates if the manual backups are immutable.
Atleast one of daily_backup_immutable,
weekly_backup_immutable, monthly_backup_immutable and
manual_backup_immutable must be true.
"""

backup_minimum_enforced_retention_days: int = proto.Field(
proto.INT32,
number=1,
)
daily_backup_immutable: bool = proto.Field(
proto.BOOL,
number=2,
)
weekly_backup_immutable: bool = proto.Field(
proto.BOOL,
number=3,
)
monthly_backup_immutable: bool = proto.Field(
proto.BOOL,
number=4,
)
manual_backup_immutable: bool = proto.Field(
proto.BOOL,
number=5,
)

name: str = proto.Field(
proto.STRING,
number=1,
Expand Down Expand Up @@ -153,6 +206,11 @@ class BackupVaultType(proto.Enum):
proto.STRING,
number=10,
)
backup_retention_policy: BackupRetentionPolicy = proto.Field(
proto.MESSAGE,
number=11,
message=BackupRetentionPolicy,
)


class GetBackupVaultRequest(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class TransferStats(proto.Message):

Attributes:
transfer_bytes (int):
Cumulative bytes trasferred so far for the
replication relatinonship.
Cumulative bytes transferred so far for the
replication relationship.

This field is a member of `oneof`_ ``_transfer_bytes``.
total_transfer_duration (google.protobuf.duration_pb2.Duration):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,17 @@ class StoragePool(proto.Message):
Output only. Reserved for future use
satisfies_pzi (bool):
Output only. Reserved for future use
custom_performance_enabled (bool):
Optional. True if using Independent Scaling
of capacity and performance (Hyperdisk) By
default set to false
total_throughput_mibps (int):
Optional. Custom Performance Total Throughput
of the pool (in MiB/s)
total_iops (int):
Optional. Custom Performance Total IOPS of the pool If not
provided, it will be calculated based on the
total_throughput_mibps
"""

class State(proto.Enum):
Expand Down Expand Up @@ -412,6 +423,18 @@ class State(proto.Enum):
proto.BOOL,
number=24,
)
custom_performance_enabled: bool = proto.Field(
proto.BOOL,
number=25,
)
total_throughput_mibps: int = proto.Field(
proto.INT64,
number=26,
)
total_iops: int = proto.Field(
proto.INT64,
number=27,
)


class ValidateDirectoryServiceRequest(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-netapp",
"version": "0.3.22"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2037,6 +2037,9 @@ def test_get_storage_pool(request_type, transport: str = "grpc"):
zone="zone_value",
satisfies_pzs=True,
satisfies_pzi=True,
custom_performance_enabled=True,
total_throughput_mibps=2391,
total_iops=1086,
)
response = client.get_storage_pool(request)

Expand Down Expand Up @@ -2068,6 +2071,9 @@ def test_get_storage_pool(request_type, transport: str = "grpc"):
assert response.zone == "zone_value"
assert response.satisfies_pzs is True
assert response.satisfies_pzi is True
assert response.custom_performance_enabled is True
assert response.total_throughput_mibps == 2391
assert response.total_iops == 1086


def test_get_storage_pool_non_empty_request_with_auto_populated_field():
Expand Down Expand Up @@ -2215,6 +2221,9 @@ async def test_get_storage_pool_async(
zone="zone_value",
satisfies_pzs=True,
satisfies_pzi=True,
custom_performance_enabled=True,
total_throughput_mibps=2391,
total_iops=1086,
)
)
response = await client.get_storage_pool(request)
Expand Down Expand Up @@ -2247,6 +2256,9 @@ async def test_get_storage_pool_async(
assert response.zone == "zone_value"
assert response.satisfies_pzs is True
assert response.satisfies_pzi is True
assert response.custom_performance_enabled is True
assert response.total_throughput_mibps == 2391
assert response.total_iops == 1086


@pytest.mark.asyncio
Expand Down Expand Up @@ -36283,6 +36295,9 @@ async def test_get_storage_pool_empty_call_grpc_asyncio():
zone="zone_value",
satisfies_pzs=True,
satisfies_pzi=True,
custom_performance_enabled=True,
total_throughput_mibps=2391,
total_iops=1086,
)
)
await client.get_storage_pool(request=None)
Expand Down Expand Up @@ -38133,6 +38148,9 @@ def test_create_storage_pool_rest_call_success(request_type):
"zone": "zone_value",
"satisfies_pzs": True,
"satisfies_pzi": True,
"custom_performance_enabled": True,
"total_throughput_mibps": 2391,
"total_iops": 1086,
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down Expand Up @@ -38348,6 +38366,9 @@ def test_get_storage_pool_rest_call_success(request_type):
zone="zone_value",
satisfies_pzs=True,
satisfies_pzi=True,
custom_performance_enabled=True,
total_throughput_mibps=2391,
total_iops=1086,
)

# Wrap the value into a proper Response obj
Expand Down Expand Up @@ -38384,6 +38405,9 @@ def test_get_storage_pool_rest_call_success(request_type):
assert response.zone == "zone_value"
assert response.satisfies_pzs is True
assert response.satisfies_pzi is True
assert response.custom_performance_enabled is True
assert response.total_throughput_mibps == 2391
assert response.total_iops == 1086


@pytest.mark.parametrize("null_interceptor", [True, False])
Expand Down Expand Up @@ -38516,6 +38540,9 @@ def test_update_storage_pool_rest_call_success(request_type):
"zone": "zone_value",
"satisfies_pzs": True,
"satisfies_pzi": True,
"custom_performance_enabled": True,
"total_throughput_mibps": 2391,
"total_iops": 1086,
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down Expand Up @@ -44369,6 +44396,13 @@ def test_create_backup_vault_rest_call_success(request_type):
"backup_region": "backup_region_value",
"source_backup_vault": "source_backup_vault_value",
"destination_backup_vault": "destination_backup_vault_value",
"backup_retention_policy": {
"backup_minimum_enforced_retention_days": 4029,
"daily_backup_immutable": True,
"weekly_backup_immutable": True,
"monthly_backup_immutable": True,
"manual_backup_immutable": True,
},
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down Expand Up @@ -44850,6 +44884,13 @@ def test_update_backup_vault_rest_call_success(request_type):
"backup_region": "backup_region_value",
"source_backup_vault": "source_backup_vault_value",
"destination_backup_vault": "destination_backup_vault_value",
"backup_retention_policy": {
"backup_minimum_enforced_retention_days": 4029,
"daily_backup_immutable": True,
"weekly_backup_immutable": True,
"monthly_backup_immutable": True,
"manual_backup_immutable": True,
},
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down Expand Up @@ -45173,6 +45214,7 @@ def test_create_backup_rest_call_success(request_type):
"satisfies_pzi": True,
"volume_region": "volume_region_value",
"backup_region": "backup_region_value",
"enforced_retention_end_time": {},
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down Expand Up @@ -45772,6 +45814,7 @@ def test_update_backup_rest_call_success(request_type):
"satisfies_pzi": True,
"volume_region": "volume_region_value",
"backup_region": "backup_region_value",
"enforced_retention_end_time": {},
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down
Loading
0