Skip to content

Commit

Permalink
feat: added expire_time and ttl fields to Secret
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 352563582

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Jan 19 07:29:20 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 9ecdacc9a00e1dd443b11bf10215d6e7648db8a7
Source-Link: googleapis/googleapis@9ecdacc
  • Loading branch information
yoshi-automation authored and jskeet committed Jan 19, 2021
1 parent 2600d0a commit 9bd5f77
Show file tree
Hide file tree
Showing 3 changed files with 227 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public void CreateSecretRequestObject()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.CreateSecret(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -83,6 +85,8 @@ public void CreateSecretRequestObject()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.CreateSecretAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Secret>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -115,6 +119,8 @@ public void CreateSecret()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.CreateSecret(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -145,6 +151,8 @@ public void CreateSecret()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.CreateSecretAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Secret>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -177,6 +185,8 @@ public void CreateSecretResourceNames()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.CreateSecret(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -207,6 +217,8 @@ public void CreateSecretResourceNames()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.CreateSecretAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Secret>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -387,6 +399,8 @@ public void GetSecretRequestObject()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.GetSecret(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -415,6 +429,8 @@ public void GetSecretRequestObject()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.GetSecretAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Secret>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -445,6 +461,8 @@ public void GetSecret()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.GetSecret(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -473,6 +491,8 @@ public void GetSecret()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.GetSecretAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Secret>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -503,6 +523,8 @@ public void GetSecretResourceNames()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.GetSecret(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -531,6 +553,8 @@ public void GetSecretResourceNames()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.GetSecretAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Secret>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -562,6 +586,8 @@ public void UpdateSecretRequestObject()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.UpdateSecret(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -591,6 +617,8 @@ public void UpdateSecretRequestObject()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.UpdateSecretAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Secret>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -622,6 +650,8 @@ public void UpdateSecret()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.UpdateSecret(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -651,6 +681,8 @@ public void UpdateSecret()
"value60c16320"
},
},
ExpireTime = new wkt::Timestamp(),
Ttl = new wkt::Duration(),
};
mockGrpcClient.Setup(x => x.UpdateSecretAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Secret>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecretManagerServiceClient client = new SecretManagerServiceClientImpl(mockGrpcClient.Object, null);
Expand Down
Loading

0 comments on commit 9bd5f77

Please sign in to comment.