feat(protocol): include Apollo client identity in session work
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Code generated by tools/generate.py; DO NOT EDIT.
|
||||
#![allow(non_snake_case)]
|
||||
pub const SCHEMA_SHA256: &str = "c075c6fc472ce858337c3ad6c4b2f4dcfa88446d5471afb46c2f6931cbcf1b1d";
|
||||
pub const SCHEMA_SHA256: &str = "792abfb9cfe70e79911d499d76c009ab848713278bc240b88576df520580e480";
|
||||
pub const CURRENT_WIRE_VERSION: &str = "1";
|
||||
pub const N_MINUS_1_WIRE_VERSION: &str = "0";
|
||||
pub const N_MINUS_2_WIRE_VERSION: &str = "-1";
|
||||
@@ -993,6 +993,7 @@ pub struct ProviderSessionWork {
|
||||
providerIdentity: String,
|
||||
policyVersionId: String,
|
||||
applicationId: String,
|
||||
clientId: String,
|
||||
managementHost: String,
|
||||
managementPort: i64,
|
||||
streamHost: String,
|
||||
@@ -1003,8 +1004,8 @@ pub struct ProviderSessionWork {
|
||||
}
|
||||
|
||||
impl ProviderSessionWork {
|
||||
pub fn new(version: String, sessionId: String, gatewayId: String, reconnectSequence: i64, expiresAt: String, providerProfile: String, providerIdentity: String, policyVersionId: String, applicationId: String, managementHost: String, managementPort: i64, streamHost: String, streamPort: i64, clientCertificatePem: String, clientPrivateKeyPem: String, serverCertificatePem: String) -> Result<Self, ValidationError> {
|
||||
let value = Self { version, sessionId, gatewayId, reconnectSequence, expiresAt, providerProfile, providerIdentity, policyVersionId, applicationId, managementHost, managementPort, streamHost, streamPort, clientCertificatePem, clientPrivateKeyPem, serverCertificatePem };
|
||||
pub fn new(version: String, sessionId: String, gatewayId: String, reconnectSequence: i64, expiresAt: String, providerProfile: String, providerIdentity: String, policyVersionId: String, applicationId: String, clientId: String, managementHost: String, managementPort: i64, streamHost: String, streamPort: i64, clientCertificatePem: String, clientPrivateKeyPem: String, serverCertificatePem: String) -> Result<Self, ValidationError> {
|
||||
let value = Self { version, sessionId, gatewayId, reconnectSequence, expiresAt, providerProfile, providerIdentity, policyVersionId, applicationId, clientId, managementHost, managementPort, streamHost, streamPort, clientCertificatePem, clientPrivateKeyPem, serverCertificatePem };
|
||||
value.validate()?;
|
||||
Ok(value)
|
||||
}
|
||||
@@ -1028,6 +1029,9 @@ impl ProviderSessionWork {
|
||||
if self.applicationId.is_empty() { return Err(ValidationError::new("application_id", "required")); }
|
||||
if !self.applicationId.is_empty() && self.applicationId.len() < 1 { return Err(ValidationError::new("application_id", "min_length")); }
|
||||
if self.applicationId.len() > 128 { return Err(ValidationError::new("application_id", "max_length")); }
|
||||
if self.clientId.is_empty() { return Err(ValidationError::new("client_id", "required")); }
|
||||
if !self.clientId.is_empty() && self.clientId.len() < 1 { return Err(ValidationError::new("client_id", "min_length")); }
|
||||
if self.clientId.len() > 128 { return Err(ValidationError::new("client_id", "max_length")); }
|
||||
if self.managementHost.is_empty() { return Err(ValidationError::new("management_host", "required")); }
|
||||
if !self.managementHost.is_empty() && self.managementHost.len() < 1 { return Err(ValidationError::new("management_host", "min_length")); }
|
||||
if self.managementHost.len() > 256 { return Err(ValidationError::new("management_host", "max_length")); }
|
||||
@@ -1058,6 +1062,7 @@ impl ProviderSessionWork {
|
||||
pub fn providerIdentity(&self) -> &String { &self.providerIdentity }
|
||||
pub fn policyVersionId(&self) -> &String { &self.policyVersionId }
|
||||
pub fn applicationId(&self) -> &String { &self.applicationId }
|
||||
pub fn clientId(&self) -> &String { &self.clientId }
|
||||
pub fn managementHost(&self) -> &String { &self.managementHost }
|
||||
pub fn managementPort(&self) -> &i64 { &self.managementPort }
|
||||
pub fn streamHost(&self) -> &String { &self.streamHost }
|
||||
|
||||
Reference in New Issue
Block a user