Skip to content

Commit

Permalink
feat: [Cloud Memorystore for Redis] Add CMEK key field
Browse files Browse the repository at this point in the history
feat: [Cloud Memorystore for Redis] Add suspension_reasons field
feat: [Cloud Memorystore for Redis] Add persistence support
feat: [Cloud Memorystore for Redis] Add self service update maintenance version support

PiperOrigin-RevId: 529822563

Source-Link: googleapis/googleapis@6a0ac6d

Source-Link: googleapis/googleapis-gen@66da9c3
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuUmVkaXMuVjEvLk93bEJvdC55YW1sIiwiaCI6IjY2ZGE5YzMyMmRlYjc1ZmI4OWQ1YTM1MDVmNTcyNjQ0ZDRmMDc2OTgifQ==
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed May 6, 2023
1 parent 820fde9 commit 5856c34
Show file tree
Hide file tree
Showing 7 changed files with 934 additions and 248 deletions.
1,117 changes: 876 additions & 241 deletions apis/Google.Cloud.Redis.V1/Google.Cloud.Redis.V1/CloudRedis.g.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using gax = Google.Api.Gax;
using gaxgrpc = Google.Api.Gax.Grpc;
using gagr = Google.Api.Gax.ResourceNames;
using gcl = Google.Cloud.Location;
using lro = Google.LongRunning;
using proto = Google.Protobuf;
using wkt = Google.Protobuf.WellKnownTypes;
Expand Down Expand Up @@ -67,6 +68,7 @@ private CloudRedisSettings(CloudRedisSettings existing) : base(existing)
DeleteInstanceOperationsSettings = existing.DeleteInstanceOperationsSettings.Clone();
RescheduleMaintenanceSettings = existing.RescheduleMaintenanceSettings;
RescheduleMaintenanceOperationsSettings = existing.RescheduleMaintenanceOperationsSettings.Clone();
LocationsSettings = existing.LocationsSettings;
OnCopy(existing);
}

Expand Down Expand Up @@ -348,6 +350,11 @@ private CloudRedisSettings(CloudRedisSettings existing) : base(existing)
DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)),
};

/// <summary>
/// The settings to use for the <see cref="gcl::LocationsClient"/> associated with the client.
/// </summary>
public gcl::LocationsSettings LocationsSettings { get; set; } = gcl::LocationsSettings.GetDefault();

/// <summary>Creates a deep clone of this object, with all the same property values.</summary>
/// <returns>A deep clone of this <see cref="CloudRedisSettings"/> object.</returns>
public CloudRedisSettings Clone() => new CloudRedisSettings(this);
Expand Down Expand Up @@ -502,6 +509,9 @@ internal static CloudRedisClient Create(grpccore::CallInvoker callInvoker, Cloud
/// <summary>The underlying gRPC CloudRedis client</summary>
public virtual CloudRedis.CloudRedisClient GrpcClient => throw new sys::NotImplementedException();

/// <summary>The <see cref="gcl::LocationsClient"/> associated with this client.</summary>
public virtual gcl::LocationsClient LocationsClient => throw new sys::NotImplementedException();

/// <summary>
/// Lists all Redis instances owned by a project in either the specified
/// location (region) or all locations.
Expand Down Expand Up @@ -2269,7 +2279,8 @@ public virtual InstanceAuthString GetInstanceAuthString(InstanceName name, gaxgr
/// where `location_id` refers to a GCP region.
/// </param>
/// <param name="rescheduleType">
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
/// well.
/// </param>
/// <param name="scheduleTime">
/// Optional. Timestamp when the maintenance shall be rescheduled to if
Expand All @@ -2296,7 +2307,8 @@ public virtual InstanceAuthString GetInstanceAuthString(InstanceName name, gaxgr
/// where `location_id` refers to a GCP region.
/// </param>
/// <param name="rescheduleType">
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
/// well.
/// </param>
/// <param name="scheduleTime">
/// Optional. Timestamp when the maintenance shall be rescheduled to if
Expand All @@ -2323,7 +2335,8 @@ public virtual InstanceAuthString GetInstanceAuthString(InstanceName name, gaxgr
/// where `location_id` refers to a GCP region.
/// </param>
/// <param name="rescheduleType">
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
/// well.
/// </param>
/// <param name="scheduleTime">
/// Optional. Timestamp when the maintenance shall be rescheduled to if
Expand All @@ -2345,7 +2358,8 @@ public virtual InstanceAuthString GetInstanceAuthString(InstanceName name, gaxgr
/// where `location_id` refers to a GCP region.
/// </param>
/// <param name="rescheduleType">
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
/// well.
/// </param>
/// <param name="scheduleTime">
/// Optional. Timestamp when the maintenance shall be rescheduled to if
Expand All @@ -2372,7 +2386,8 @@ public virtual InstanceAuthString GetInstanceAuthString(InstanceName name, gaxgr
/// where `location_id` refers to a GCP region.
/// </param>
/// <param name="rescheduleType">
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
/// well.
/// </param>
/// <param name="scheduleTime">
/// Optional. Timestamp when the maintenance shall be rescheduled to if
Expand All @@ -2399,7 +2414,8 @@ public virtual InstanceAuthString GetInstanceAuthString(InstanceName name, gaxgr
/// where `location_id` refers to a GCP region.
/// </param>
/// <param name="rescheduleType">
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
/// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
/// well.
/// </param>
/// <param name="scheduleTime">
/// Optional. Timestamp when the maintenance shall be rescheduled to if
Expand Down Expand Up @@ -2473,6 +2489,7 @@ public CloudRedisClientImpl(CloudRedis.CloudRedisClient grpcClient, CloudRedisSe
FailoverInstanceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.FailoverInstanceOperationsSettings, logger);
DeleteInstanceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.DeleteInstanceOperationsSettings, logger);
RescheduleMaintenanceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.RescheduleMaintenanceOperationsSettings, logger);
LocationsClient = new gcl::LocationsClientImpl(grpcClient.CreateLocationsClient(), effectiveSettings.LocationsSettings, logger);
_callListInstances = clientHelper.BuildApiCall<ListInstancesRequest, ListInstancesResponse>("ListInstances", grpcClient.ListInstancesAsync, grpcClient.ListInstances, effectiveSettings.ListInstancesSettings).WithGoogleRequestParam("parent", request => request.Parent);
Modify_ApiCall(ref _callListInstances);
Modify_ListInstancesApiCall(ref _callListInstances);
Expand Down Expand Up @@ -2538,6 +2555,9 @@ public CloudRedisClientImpl(CloudRedis.CloudRedisClient grpcClient, CloudRedisSe
/// <summary>The underlying gRPC CloudRedis client</summary>
public override CloudRedis.CloudRedisClient GrpcClient { get; }

/// <summary>The <see cref="gcl::LocationsClient"/> associated with this client.</summary>
public override gcl::LocationsClient LocationsClient { get; }

partial void Modify_ListInstancesRequest(ref ListInstancesRequest request, ref gaxgrpc::CallSettings settings);

partial void Modify_GetInstanceRequest(ref GetInstanceRequest request, ref gaxgrpc::CallSettings settings);
Expand Down Expand Up @@ -2956,4 +2976,20 @@ public partial class CloudRedisClient
new lro::Operations.OperationsClient(CallInvoker);
}
}

public static partial class CloudRedis
{
public partial class CloudRedisClient
{
/// <summary>
/// Creates a new instance of <see cref="gcl::Locations.LocationsClient"/> using the same call invoker as
/// this client.
/// </summary>
/// <returns>
/// A new <see cref="gcl::Locations.LocationsClient"/> for the same target as this client.
/// </returns>
public virtual gcl::Locations.LocationsClient CreateLocationsClient() =>
new gcl::Locations.LocationsClient(CallInvoker);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// source: google/cloud/redis/v1/cloud_redis.proto
// </auto-generated>
// Original file comments:
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<ItemGroup>
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="5.0.0" PrivateAssets="All" />
<PackageReference Include="Google.Api.Gax.Grpc" Version="[4.3.0, 5.0.0)" />
<PackageReference Include="Google.Cloud.Location" Version="[2.0.0, 3.0.0)" />
<PackageReference Include="Google.LongRunning" Version="[3.0.0, 4.0.0)" />
<PackageReference Include="Grpc.Core" Version="[2.46.5, 3.0.0)" PrivateAssets="None" Condition="'$(TargetFramework)'=='net462'" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#pragma warning disable CS8981
using gaxgrpc = Google.Api.Gax.Grpc;
using gcl = Google.Cloud.Location;
using lro = Google.LongRunning;
using proto = Google.Protobuf;
using gpr = Google.Protobuf.Reflection;
Expand All @@ -31,6 +32,16 @@ internal static class PackageApiMetadata
.WithRequestNumericEnumJsonEncoding(true)
.WithHttpRuleOverrides(new scg::Dictionary<string, proto::ByteString>
{
{
"google.cloud.location.Locations.GetLocation",
// { "get": "/v1/{name=projects/*/locations/*}" }
proto::ByteString.FromBase64("EiEvdjEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKn0=")
},
{
"google.cloud.location.Locations.ListLocations",
// { "get": "/v1/{name=projects/*}/locations" }
proto::ByteString.FromBase64("Eh8vdjEve25hbWU9cHJvamVjdHMvKn0vbG9jYXRpb25z")
},
{
"google.longrunning.Operations.CancelOperation",
// { "post": "/v1/{name=projects/*/locations/*/operations/*}:cancel" }
Expand All @@ -55,6 +66,7 @@ internal static class PackageApiMetadata

private static scg::IEnumerable<gpr::FileDescriptor> GetFileDescriptors()
{
yield return gcl::LocationsReflection.Descriptor;
yield return CloudRedisReflection.Descriptor;
yield return lro::OperationsReflection.Descriptor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#pragma warning disable CS8981
using gaxgrpc = Google.Api.Gax.Grpc;
using gcl = Google.Cloud.Location;
using gcrv = Google.Cloud.Redis.V1;
using lro = Google.LongRunning;
using proto = Google.Protobuf;
Expand Down
1 change: 1 addition & 0 deletions apis/apis.json
Original file line number Diff line number Diff line change
Expand Up @@ -3579,6 +3579,7 @@
"description": "Recommended Google client library to administer Cloud Memorystore for Redis.",
"dependencies": {
"Google.Api.Gax.Grpc": "4.3.0",
"Google.Cloud.Location": "2.0.0",
"Google.LongRunning": "3.0.0",
"Grpc.Core": "2.46.5"
},
Expand Down

0 comments on commit 5856c34

Please sign in to comment.