/// <summary>
 /// Initializes a new instance of the PublishDatasourceToGatewayRequest
 /// class.
 /// </summary>
 /// <param name="dataSourceType">The datasource type</param>
 /// <param name="connectionDetails">The connection details</param>
 /// <param name="dataSourceName">The datasource name</param>
 public PublishDatasourceToGatewayRequest(string dataSourceType, string connectionDetails, CredentialDetails credentialDetails, string dataSourceName)
 {
     DataSourceType    = dataSourceType;
     ConnectionDetails = connectionDetails;
     CredentialDetails = credentialDetails;
     DataSourceName    = dataSourceName;
     CustomInit();
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (DataSourceType == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "DataSourceType");
     }
     if (ConnectionDetails == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionDetails");
     }
     if (CredentialDetails == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CredentialDetails");
     }
     if (DataSourceName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "DataSourceName");
     }
     if (CredentialDetails != null)
     {
         CredentialDetails.Validate();
     }
 }
 /// <summary>
 /// Initializes a new instance of the UpdateDatasourceRequest class.
 /// </summary>
 public UpdateDatasourceRequest(CredentialDetails credentialDetails)
 {
     CredentialDetails = credentialDetails;
     CustomInit();
 }